{"action":"created","comment":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/63114143","id":63114143,"diff_hunk":"@@ -329,12 +329,14 @@ def bang_bang(args, stdin=None):\n def which_version():\n     \"\"\"Returns output from system `which -v`\"\"\"\n     if sys.platform == 'darwin':\n-        if ('gnu' not in subprocess.check_output(['which'],\n-                                                 stderr=subprocess.PIPE)):\n+        try:","path":"xonsh/aliases.py","position":6,"original_position":6,"commit_id":"a91c3940d10daad2078e413470677ad97e3ef208","original_commit_id":"a91c3940d10daad2078e413470677ad97e3ef208","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"body":"I think that this try-except block should be bumped up to the top level. I am on linux (Ubuntu) but I also don't have a `-v` option:\r\n\r\n```console\r\nscopatz@artemis ~ $ /usr/bin/which --version\r\nIllegal option --\r\nUsage: /usr/bin/which [-a] args\r\n```","created_at":"2016-05-12T23:30:41Z","updated_at":"2016-05-12T23:30:41Z","html_url":"https://github.com/scopatz/xonsh/pull/871#discussion_r63114143","pull_request_url":"https://api.github.com/repos/scopatz/xonsh/pulls/871","_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/63114143"},"html":{"href":"https://github.com/scopatz/xonsh/pull/871#discussion_r63114143"},"pull_request":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/871"}}},"pull_request":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/871","id":69922466,"html_url":"https://github.com/scopatz/xonsh/pull/871","diff_url":"https://github.com/scopatz/xonsh/pull/871.diff","patch_url":"https://github.com/scopatz/xonsh/pull/871.patch","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/871","number":871,"state":"open","locked":false,"title":"add potential fix for which ails","user":{"login":"gforsyth","id":3596999,"avatar_url":"https://avatars.githubusercontent.com/u/3596999?v=3","gravatar_id":"","url":"https://api.github.com/users/gforsyth","html_url":"https://github.com/gforsyth","followers_url":"https://api.github.com/users/gforsyth/followers","following_url":"https://api.github.com/users/gforsyth/following{/other_user}","gists_url":"https://api.github.com/users/gforsyth/gists{/gist_id}","starred_url":"https://api.github.com/users/gforsyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gforsyth/subscriptions","organizations_url":"https://api.github.com/users/gforsyth/orgs","repos_url":"https://api.github.com/users/gforsyth/repos","events_url":"https://api.github.com/users/gforsyth/events{/privacy}","received_events_url":"https://api.github.com/users/gforsyth/received_events","type":"User","site_admin":false},"body":"a fix for those things `which` ails you?  I hope?  Maybe?\r\n\r\nping @scopatz @Carreau ","created_at":"2016-05-12T23:22:56Z","updated_at":"2016-05-12T23:30:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c033d11b25335842ed2c2747845a160cb0f46695","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scopatz/xonsh/pulls/871/commits","review_comments_url":"https://api.github.com/repos/scopatz/xonsh/pulls/871/comments","review_comment_url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/871/comments","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/a91c3940d10daad2078e413470677ad97e3ef208","head":{"label":"gforsyth:fixwhich","ref":"fixwhich","sha":"a91c3940d10daad2078e413470677ad97e3ef208","user":{"login":"gforsyth","id":3596999,"avatar_url":"https://avatars.githubusercontent.com/u/3596999?v=3","gravatar_id":"","url":"https://api.github.com/users/gforsyth","html_url":"https://github.com/gforsyth","followers_url":"https://api.github.com/users/gforsyth/followers","following_url":"https://api.github.com/users/gforsyth/following{/other_user}","gists_url":"https://api.github.com/users/gforsyth/gists{/gist_id}","starred_url":"https://api.github.com/users/gforsyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gforsyth/subscriptions","organizations_url":"https://api.github.com/users/gforsyth/orgs","repos_url":"https://api.github.com/users/gforsyth/repos","events_url":"https://api.github.com/users/gforsyth/events{/privacy}","received_events_url":"https://api.github.com/users/gforsyth/received_events","type":"User","site_admin":false},"repo":{"id":42677306,"name":"xonsh","full_name":"gforsyth/xonsh","owner":{"login":"gforsyth","id":3596999,"avatar_url":"https://avatars.githubusercontent.com/u/3596999?v=3","gravatar_id":"","url":"https://api.github.com/users/gforsyth","html_url":"https://github.com/gforsyth","followers_url":"https://api.github.com/users/gforsyth/followers","following_url":"https://api.github.com/users/gforsyth/following{/other_user}","gists_url":"https://api.github.com/users/gforsyth/gists{/gist_id}","starred_url":"https://api.github.com/users/gforsyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gforsyth/subscriptions","organizations_url":"https://api.github.com/users/gforsyth/orgs","repos_url":"https://api.github.com/users/gforsyth/repos","events_url":"https://api.github.com/users/gforsyth/events{/privacy}","received_events_url":"https://api.github.com/users/gforsyth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gforsyth/xonsh","description":"xonsh is a Python-ish, BASHwards-compatible shell.","fork":true,"url":"https://api.github.com/repos/gforsyth/xonsh","forks_url":"https://api.github.com/repos/gforsyth/xonsh/forks","keys_url":"https://api.github.com/repos/gforsyth/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gforsyth/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gforsyth/xonsh/teams","hooks_url":"https://api.github.com/repos/gforsyth/xonsh/hooks","issue_events_url":"https://api.github.com/repos/gforsyth/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/gforsyth/xonsh/events","assignees_url":"https://api.github.com/repos/gforsyth/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/gforsyth/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/gforsyth/xonsh/tags","blobs_url":"https://api.github.com/repos/gforsyth/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gforsyth/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gforsyth/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/gforsyth/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gforsyth/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/gforsyth/xonsh/languages","stargazers_url":"https://api.github.com/repos/gforsyth/xonsh/stargazers","contributors_url":"https://api.github.com/repos/gforsyth/xonsh/contributors","subscribers_url":"https://api.github.com/repos/gforsyth/xonsh/subscribers","subscription_url":"https://api.github.com/repos/gforsyth/xonsh/subscription","commits_url":"https://api.github.com/repos/gforsyth/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/gforsyth/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/gforsyth/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/gforsyth/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/gforsyth/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/gforsyth/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gforsyth/xonsh/merges","archive_url":"https://api.github.com/repos/gforsyth/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gforsyth/xonsh/downloads","issues_url":"https://api.github.com/repos/gforsyth/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/gforsyth/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/gforsyth/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/gforsyth/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gforsyth/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/gforsyth/xonsh/releases{/id}","deployments_url":"https://api.github.com/repos/gforsyth/xonsh/deployments","created_at":"2015-09-17T19:33:04Z","updated_at":"2016-01-11T16:58:30Z","pushed_at":"2016-05-12T23:27:54Z","git_url":"git://github.com/gforsyth/xonsh.git","ssh_url":"git@github.com:gforsyth/xonsh.git","clone_url":"https://github.com/gforsyth/xonsh.git","svn_url":"https://github.com/gforsyth/xonsh","homepage":"http://xonsh.org","size":4249,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scopatz:master","ref":"master","sha":"520fb2dcab5504e493bd0e1af31953dbfae3748a","user":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"repo":{"id":29620400,"name":"xonsh","full_name":"scopatz/xonsh","owner":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scopatz/xonsh","description":"xonsh is a Python-ish, BASHwards-facing shell.","fork":false,"url":"https://api.github.com/repos/scopatz/xonsh","forks_url":"https://api.github.com/repos/scopatz/xonsh/forks","keys_url":"https://api.github.com/repos/scopatz/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scopatz/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scopatz/xonsh/teams","hooks_url":"https://api.github.com/repos/scopatz/xonsh/hooks","issue_events_url":"https://api.github.com/repos/scopatz/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/scopatz/xonsh/events","assignees_url":"https://api.github.com/repos/scopatz/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/scopatz/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/scopatz/xonsh/tags","blobs_url":"https://api.github.com/repos/scopatz/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scopatz/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scopatz/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/scopatz/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/scopatz/xonsh/languages","stargazers_url":"https://api.github.com/repos/scopatz/xonsh/stargazers","contributors_url":"https://api.github.com/repos/scopatz/xonsh/contributors","subscribers_url":"https://api.github.com/repos/scopatz/xonsh/subscribers","subscription_url":"https://api.github.com/repos/scopatz/xonsh/subscription","commits_url":"https://api.github.com/repos/scopatz/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/scopatz/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/scopatz/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/scopatz/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/scopatz/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/scopatz/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scopatz/xonsh/merges","archive_url":"https://api.github.com/repos/scopatz/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scopatz/xonsh/downloads","issues_url":"https://api.github.com/repos/scopatz/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/scopatz/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/scopatz/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/scopatz/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scopatz/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/scopatz/xonsh/releases{/id}","deployments_url":"https://api.github.com/repos/scopatz/xonsh/deployments","created_at":"2015-01-21T22:05:27Z","updated_at":"2016-05-12T22:43:10Z","pushed_at":"2016-05-12T23:27:55Z","git_url":"git://github.com/scopatz/xonsh.git","ssh_url":"git@github.com:scopatz/xonsh.git","clone_url":"https://github.com/scopatz/xonsh.git","svn_url":"https://github.com/scopatz/xonsh","homepage":"http://xon.sh","size":5105,"stargazers_count":1053,"watchers_count":1053,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":128,"forks":99,"open_issues":128,"watchers":1053,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/871"},"html":{"href":"https://github.com/scopatz/xonsh/pull/871"},"issue":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/871"},"comments":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/871/comments"},"review_comments":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/871/comments"},"review_comment":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/871/commits"},"statuses":{"href":"https://api.github.com/repos/scopatz/xonsh/statuses/a91c3940d10daad2078e413470677ad97e3ef208"}}}}