{"action":"created","comment":{"url":"https://api.github.com/repos/Bash-it/bash-it/pulls/comments/59469911","id":59469911,"diff_hunk":"@@ -153,7 +153,7 @@ function __powerline_battery_prompt {\n     else\n       color=\"${BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR}\"\n     fi\n-    [[ \"$(ac_adapter_connected)\" ]] && battery_status=\"${BATTERY_AC_CHAR}${battery_status}\"\n+    ac_adapter_connected && battery_status=\"${BATTERY_AC_CHAR} ${battery_status}\"","path":"themes/powerline-multiline/powerline-multiline.theme.bash","position":5,"original_position":5,"commit_id":"a9c5670c2cf0e67324cbd83a37f73da772f6aecf","original_commit_id":"a9c5670c2cf0e67324cbd83a37f73da772f6aecf","user":{"login":"edubxb","id":1192339,"avatar_url":"https://avatars.githubusercontent.com/u/1192339?v=3","gravatar_id":"","url":"https://api.github.com/users/edubxb","html_url":"https://github.com/edubxb","followers_url":"https://api.github.com/users/edubxb/followers","following_url":"https://api.github.com/users/edubxb/following{/other_user}","gists_url":"https://api.github.com/users/edubxb/gists{/gist_id}","starred_url":"https://api.github.com/users/edubxb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edubxb/subscriptions","organizations_url":"https://api.github.com/users/edubxb/orgs","repos_url":"https://api.github.com/users/edubxb/repos","events_url":"https://api.github.com/users/edubxb/events{/privacy}","received_events_url":"https://api.github.com/users/edubxb/received_events","type":"User","site_admin":false},"body":"The space between `{BATTERY_AC_CHAR}` and `${battery_status}\"` is not necessary, I personally prefer the \"ac symbol\" alone, without this space, if someone wants the space, can modify the `BATTERY_AC_CHAR` and add it.\r\n\r\nWhat do you think?","created_at":"2016-04-12T23:10:09Z","updated_at":"2016-04-12T23:10:09Z","html_url":"https://github.com/Bash-it/bash-it/pull/702#discussion_r59469911","pull_request_url":"https://api.github.com/repos/Bash-it/bash-it/pulls/702","_links":{"self":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/comments/59469911"},"html":{"href":"https://github.com/Bash-it/bash-it/pull/702#discussion_r59469911"},"pull_request":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/702"}}},"pull_request":{"url":"https://api.github.com/repos/Bash-it/bash-it/pulls/702","id":66115125,"html_url":"https://github.com/Bash-it/bash-it/pull/702","diff_url":"https://github.com/Bash-it/bash-it/pull/702.diff","patch_url":"https://github.com/Bash-it/bash-it/pull/702.patch","issue_url":"https://api.github.com/repos/Bash-it/bash-it/issues/702","number":702,"state":"open","locked":false,"title":"Added AC indicator support on OS X","user":{"login":"nwinkler","id":907063,"avatar_url":"https://avatars.githubusercontent.com/u/907063?v=3","gravatar_id":"","url":"https://api.github.com/users/nwinkler","html_url":"https://github.com/nwinkler","followers_url":"https://api.github.com/users/nwinkler/followers","following_url":"https://api.github.com/users/nwinkler/following{/other_user}","gists_url":"https://api.github.com/users/nwinkler/gists{/gist_id}","starred_url":"https://api.github.com/users/nwinkler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwinkler/subscriptions","organizations_url":"https://api.github.com/users/nwinkler/orgs","repos_url":"https://api.github.com/users/nwinkler/repos","events_url":"https://api.github.com/users/nwinkler/events{/privacy}","received_events_url":"https://api.github.com/users/nwinkler/received_events","type":"User","site_admin":false},"body":"Not sure about the logic for returning 1/0 from the function, though - will have to clarify.\r\n\r\n@edubxb - You added the `ac_adapter_connected` function back then. What is the return value of this function? From the code, it looks like this:\r\n\r\n* return 1 if the AC adapter is connected\r\n* return 0 if the AC adapter is not connected\r\n\r\nIs this correct? I found that in that case, the `[[ $(...)]]` condition in the theme does not seem to work. At least that's what I've seen on OS X.\r\n\r\nThe below fix makes it work on OS X, but I don't know whether it still works on Linux (or has ever worked)...\r\n\r\nLet me know what you think.\r\n","created_at":"2016-04-12T07:59:39Z","updated_at":"2016-04-12T23:10:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7db5a8a3e7774995981c427d015a90788dfdb680","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Bash-it/bash-it/pulls/702/commits","review_comments_url":"https://api.github.com/repos/Bash-it/bash-it/pulls/702/comments","review_comment_url":"https://api.github.com/repos/Bash-it/bash-it/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Bash-it/bash-it/issues/702/comments","statuses_url":"https://api.github.com/repos/Bash-it/bash-it/statuses/a9c5670c2cf0e67324cbd83a37f73da772f6aecf","head":{"label":"nwinkler:battery-ac-osx","ref":"battery-ac-osx","sha":"a9c5670c2cf0e67324cbd83a37f73da772f6aecf","user":{"login":"nwinkler","id":907063,"avatar_url":"https://avatars.githubusercontent.com/u/907063?v=3","gravatar_id":"","url":"https://api.github.com/users/nwinkler","html_url":"https://github.com/nwinkler","followers_url":"https://api.github.com/users/nwinkler/followers","following_url":"https://api.github.com/users/nwinkler/following{/other_user}","gists_url":"https://api.github.com/users/nwinkler/gists{/gist_id}","starred_url":"https://api.github.com/users/nwinkler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwinkler/subscriptions","organizations_url":"https://api.github.com/users/nwinkler/orgs","repos_url":"https://api.github.com/users/nwinkler/repos","events_url":"https://api.github.com/users/nwinkler/events{/privacy}","received_events_url":"https://api.github.com/users/nwinkler/received_events","type":"User","site_admin":false},"repo":{"id":12586736,"name":"bash-it","full_name":"nwinkler/bash-it","owner":{"login":"nwinkler","id":907063,"avatar_url":"https://avatars.githubusercontent.com/u/907063?v=3","gravatar_id":"","url":"https://api.github.com/users/nwinkler","html_url":"https://github.com/nwinkler","followers_url":"https://api.github.com/users/nwinkler/followers","following_url":"https://api.github.com/users/nwinkler/following{/other_user}","gists_url":"https://api.github.com/users/nwinkler/gists{/gist_id}","starred_url":"https://api.github.com/users/nwinkler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwinkler/subscriptions","organizations_url":"https://api.github.com/users/nwinkler/orgs","repos_url":"https://api.github.com/users/nwinkler/repos","events_url":"https://api.github.com/users/nwinkler/events{/privacy}","received_events_url":"https://api.github.com/users/nwinkler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwinkler/bash-it","description":"A community bash framework.","fork":true,"url":"https://api.github.com/repos/nwinkler/bash-it","forks_url":"https://api.github.com/repos/nwinkler/bash-it/forks","keys_url":"https://api.github.com/repos/nwinkler/bash-it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwinkler/bash-it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwinkler/bash-it/teams","hooks_url":"https://api.github.com/repos/nwinkler/bash-it/hooks","issue_events_url":"https://api.github.com/repos/nwinkler/bash-it/issues/events{/number}","events_url":"https://api.github.com/repos/nwinkler/bash-it/events","assignees_url":"https://api.github.com/repos/nwinkler/bash-it/assignees{/user}","branches_url":"https://api.github.com/repos/nwinkler/bash-it/branches{/branch}","tags_url":"https://api.github.com/repos/nwinkler/bash-it/tags","blobs_url":"https://api.github.com/repos/nwinkler/bash-it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwinkler/bash-it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwinkler/bash-it/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwinkler/bash-it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwinkler/bash-it/statuses/{sha}","languages_url":"https://api.github.com/repos/nwinkler/bash-it/languages","stargazers_url":"https://api.github.com/repos/nwinkler/bash-it/stargazers","contributors_url":"https://api.github.com/repos/nwinkler/bash-it/contributors","subscribers_url":"https://api.github.com/repos/nwinkler/bash-it/subscribers","subscription_url":"https://api.github.com/repos/nwinkler/bash-it/subscription","commits_url":"https://api.github.com/repos/nwinkler/bash-it/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwinkler/bash-it/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwinkler/bash-it/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwinkler/bash-it/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwinkler/bash-it/contents/{+path}","compare_url":"https://api.github.com/repos/nwinkler/bash-it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwinkler/bash-it/merges","archive_url":"https://api.github.com/repos/nwinkler/bash-it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwinkler/bash-it/downloads","issues_url":"https://api.github.com/repos/nwinkler/bash-it/issues{/number}","pulls_url":"https://api.github.com/repos/nwinkler/bash-it/pulls{/number}","milestones_url":"https://api.github.com/repos/nwinkler/bash-it/milestones{/number}","notifications_url":"https://api.github.com/repos/nwinkler/bash-it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwinkler/bash-it/labels{/name}","releases_url":"https://api.github.com/repos/nwinkler/bash-it/releases{/id}","deployments_url":"https://api.github.com/repos/nwinkler/bash-it/deployments","created_at":"2013-09-04T09:14:18Z","updated_at":"2015-05-05T09:47:28Z","pushed_at":"2016-04-12T07:56:12Z","git_url":"git://github.com/nwinkler/bash-it.git","ssh_url":"git@github.com:nwinkler/bash-it.git","clone_url":"https://github.com/nwinkler/bash-it.git","svn_url":"https://github.com/nwinkler/bash-it","homepage":"","size":35851,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"Bash-it:master","ref":"master","sha":"5035b2d815e4f2ceeb6ca3e38f346661cd348824","user":{"login":"Bash-it","id":11575812,"avatar_url":"https://avatars.githubusercontent.com/u/11575812?v=3","gravatar_id":"","url":"https://api.github.com/users/Bash-it","html_url":"https://github.com/Bash-it","followers_url":"https://api.github.com/users/Bash-it/followers","following_url":"https://api.github.com/users/Bash-it/following{/other_user}","gists_url":"https://api.github.com/users/Bash-it/gists{/gist_id}","starred_url":"https://api.github.com/users/Bash-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bash-it/subscriptions","organizations_url":"https://api.github.com/users/Bash-it/orgs","repos_url":"https://api.github.com/users/Bash-it/repos","events_url":"https://api.github.com/users/Bash-it/events{/privacy}","received_events_url":"https://api.github.com/users/Bash-it/received_events","type":"Organization","site_admin":false},"repo":{"id":957012,"name":"bash-it","full_name":"Bash-it/bash-it","owner":{"login":"Bash-it","id":11575812,"avatar_url":"https://avatars.githubusercontent.com/u/11575812?v=3","gravatar_id":"","url":"https://api.github.com/users/Bash-it","html_url":"https://github.com/Bash-it","followers_url":"https://api.github.com/users/Bash-it/followers","following_url":"https://api.github.com/users/Bash-it/following{/other_user}","gists_url":"https://api.github.com/users/Bash-it/gists{/gist_id}","starred_url":"https://api.github.com/users/Bash-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bash-it/subscriptions","organizations_url":"https://api.github.com/users/Bash-it/orgs","repos_url":"https://api.github.com/users/Bash-it/repos","events_url":"https://api.github.com/users/Bash-it/events{/privacy}","received_events_url":"https://api.github.com/users/Bash-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Bash-it/bash-it","description":"A community Bash framework.","fork":false,"url":"https://api.github.com/repos/Bash-it/bash-it","forks_url":"https://api.github.com/repos/Bash-it/bash-it/forks","keys_url":"https://api.github.com/repos/Bash-it/bash-it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bash-it/bash-it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bash-it/bash-it/teams","hooks_url":"https://api.github.com/repos/Bash-it/bash-it/hooks","issue_events_url":"https://api.github.com/repos/Bash-it/bash-it/issues/events{/number}","events_url":"https://api.github.com/repos/Bash-it/bash-it/events","assignees_url":"https://api.github.com/repos/Bash-it/bash-it/assignees{/user}","branches_url":"https://api.github.com/repos/Bash-it/bash-it/branches{/branch}","tags_url":"https://api.github.com/repos/Bash-it/bash-it/tags","blobs_url":"https://api.github.com/repos/Bash-it/bash-it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bash-it/bash-it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bash-it/bash-it/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bash-it/bash-it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bash-it/bash-it/statuses/{sha}","languages_url":"https://api.github.com/repos/Bash-it/bash-it/languages","stargazers_url":"https://api.github.com/repos/Bash-it/bash-it/stargazers","contributors_url":"https://api.github.com/repos/Bash-it/bash-it/contributors","subscribers_url":"https://api.github.com/repos/Bash-it/bash-it/subscribers","subscription_url":"https://api.github.com/repos/Bash-it/bash-it/subscription","commits_url":"https://api.github.com/repos/Bash-it/bash-it/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bash-it/bash-it/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bash-it/bash-it/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bash-it/bash-it/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bash-it/bash-it/contents/{+path}","compare_url":"https://api.github.com/repos/Bash-it/bash-it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bash-it/bash-it/merges","archive_url":"https://api.github.com/repos/Bash-it/bash-it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bash-it/bash-it/downloads","issues_url":"https://api.github.com/repos/Bash-it/bash-it/issues{/number}","pulls_url":"https://api.github.com/repos/Bash-it/bash-it/pulls{/number}","milestones_url":"https://api.github.com/repos/Bash-it/bash-it/milestones{/number}","notifications_url":"https://api.github.com/repos/Bash-it/bash-it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bash-it/bash-it/labels{/name}","releases_url":"https://api.github.com/repos/Bash-it/bash-it/releases{/id}","deployments_url":"https://api.github.com/repos/Bash-it/bash-it/deployments","created_at":"2010-10-02T18:36:17Z","updated_at":"2016-04-12T21:15:01Z","pushed_at":"2016-04-12T15:56:24Z","git_url":"git://github.com/Bash-it/bash-it.git","ssh_url":"git@github.com:Bash-it/bash-it.git","clone_url":"https://github.com/Bash-it/bash-it.git","svn_url":"https://github.com/Bash-it/bash-it","homepage":"","size":37403,"stargazers_count":4375,"watchers_count":4375,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":961,"mirror_url":null,"open_issues_count":84,"forks":961,"open_issues":84,"watchers":4375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/702"},"html":{"href":"https://github.com/Bash-it/bash-it/pull/702"},"issue":{"href":"https://api.github.com/repos/Bash-it/bash-it/issues/702"},"comments":{"href":"https://api.github.com/repos/Bash-it/bash-it/issues/702/comments"},"review_comments":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/702/comments"},"review_comment":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Bash-it/bash-it/pulls/702/commits"},"statuses":{"href":"https://api.github.com/repos/Bash-it/bash-it/statuses/a9c5670c2cf0e67324cbd83a37f73da772f6aecf"}}}}