{"action":"created","issue":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/112","labels_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/112/comments","events_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/112/events","html_url":"https://github.com/bhilburn/powerlevel9k/pull/112","id":110859684,"number":112,"title":"Improved color detection","user":{"login":"dritter","id":1544760,"avatar_url":"https://avatars.githubusercontent.com/u/1544760?v=3","gravatar_id":"","url":"https://api.github.com/users/dritter","html_url":"https://github.com/dritter","followers_url":"https://api.github.com/users/dritter/followers","following_url":"https://api.github.com/users/dritter/following{/other_user}","gists_url":"https://api.github.com/users/dritter/gists{/gist_id}","starred_url":"https://api.github.com/users/dritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dritter/subscriptions","organizations_url":"https://api.github.com/users/dritter/orgs","repos_url":"https://api.github.com/users/dritter/repos","events_url":"https://api.github.com/users/dritter/events{/privacy}","received_events_url":"https://api.github.com/users/dritter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-11T14:30:20Z","updated_at":"2015-11-02T23:30:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/112","html_url":"https://github.com/bhilburn/powerlevel9k/pull/112","diff_url":"https://github.com/bhilburn/powerlevel9k/pull/112.diff","patch_url":"https://github.com/bhilburn/powerlevel9k/pull/112.patch"},"body":"Added a new function `isSameColor` to handle color comparisons. It is now possible to compare ANSI colors (e.g. \"black\" or \"bg-red\") with ZSH-style colors (e.g. \"001\"). This way the subsegments work much better, as users can define color codes the way they like.\r\n\r\n#### Example\r\n\r\n`isSameColor bg-red red && echo true || echo false` -> returns true\r\n`isSameColor bg-red 009 && echo true || echo false` -> returns true\r\n`isSameColor 001 9 && echo true || echo false` -> returns true\r\n`isSameColor red black && echo true || echo false` -> returns false\r\n\r\nSo, it doesn't matter if users define colors in numeric ZSH-style or ANSI-style."},"comment":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/comments/153192043","html_url":"https://github.com/bhilburn/powerlevel9k/pull/112#issuecomment-153192043","issue_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/112","id":153192043,"user":{"login":"dritter","id":1544760,"avatar_url":"https://avatars.githubusercontent.com/u/1544760?v=3","gravatar_id":"","url":"https://api.github.com/users/dritter","html_url":"https://github.com/dritter","followers_url":"https://api.github.com/users/dritter/followers","following_url":"https://api.github.com/users/dritter/following{/other_user}","gists_url":"https://api.github.com/users/dritter/gists{/gist_id}","starred_url":"https://api.github.com/users/dritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dritter/subscriptions","organizations_url":"https://api.github.com/users/dritter/orgs","repos_url":"https://api.github.com/users/dritter/repos","events_url":"https://api.github.com/users/dritter/events{/privacy}","received_events_url":"https://api.github.com/users/dritter/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T23:30:30Z","updated_at":"2015-11-02T23:30:30Z","body":":+1: That sounds like a good plan. ;) Hopefully it works out of the box."}}