{"action":"created","comment":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/57515581","id":57515581,"diff_hunk":"@@ -687,10 +687,14 @@ def _is_executable_file(path):\n \n \n def yield_executables_windows(directory, name):\n+    casefold_name = name.casefold()\n     extensions = builtins.__xonsh_env__.get('PATHEXT')\n     for a_file in os.listdir(directory):\n         base_name, ext = os.path.splitext(a_file)\n-        if name == base_name and ext.upper() in extensions:\n+\n+        if (\n+            casefold_name == base_name.casefold() or casefold_name == a_file.casefold()\n+        ) and ext.upper() in extensions:","path":"xonsh/environ.py","position":12,"original_position":12,"commit_id":"c5ec76df6dda0ed19f6b041903c1953f4e298a71","original_commit_id":"c5ec76df6dda0ed19f6b041903c1953f4e298a71","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":"Casefold is more generic, and handles situations like eszett to `'ss'` conversion.  I think it is probably the right thing to use here.","created_at":"2016-03-26T16:14:40Z","updated_at":"2016-03-26T16:14:40Z","html_url":"https://github.com/scopatz/xonsh/pull/751#discussion_r57515581","pull_request_url":"https://api.github.com/repos/scopatz/xonsh/pulls/751","_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/57515581"},"html":{"href":"https://github.com/scopatz/xonsh/pull/751#discussion_r57515581"},"pull_request":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/751"}}},"pull_request":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/751","id":63560206,"html_url":"https://github.com/scopatz/xonsh/pull/751","diff_url":"https://github.com/scopatz/xonsh/pull/751.diff","patch_url":"https://github.com/scopatz/xonsh/pull/751.patch","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/751","number":751,"state":"open","locked":false,"title":"New: Add `sudo` functionality on Windows","user":{"login":"BYK","id":126780,"avatar_url":"https://avatars.githubusercontent.com/u/126780?v=3","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"body":"Not perfect since it doesn't (cannot) capture the `stdin` and `stdout` for the launched process but it works and is a good first step.","created_at":"2016-03-21T13:02:50Z","updated_at":"2016-03-26T16:14:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"462dd715a021505e99e8d37f59c0582bdecb6a17","assignee":null,"milestone":{"url":"https://api.github.com/repos/scopatz/xonsh/milestones/2","html_url":"https://github.com/scopatz/xonsh/milestones/v0.3","labels_url":"https://api.github.com/repos/scopatz/xonsh/milestones/2/labels","id":1302567,"number":2,"title":"v0.3","description":"","creator":{"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},"open_issues":101,"closed_issues":278,"state":"open","created_at":"2015-09-12T18:28:59Z","updated_at":"2016-03-23T22:37:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/scopatz/xonsh/pulls/751/commits","review_comments_url":"https://api.github.com/repos/scopatz/xonsh/pulls/751/comments","review_comment_url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/751/comments","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/c5ec76df6dda0ed19f6b041903c1953f4e298a71","head":{"label":"BYK:sudo","ref":"sudo","sha":"c5ec76df6dda0ed19f6b041903c1953f4e298a71","user":{"login":"BYK","id":126780,"avatar_url":"https://avatars.githubusercontent.com/u/126780?v=3","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"repo":{"id":37645933,"name":"xonsh","full_name":"BYK/xonsh","owner":{"login":"BYK","id":126780,"avatar_url":"https://avatars.githubusercontent.com/u/126780?v=3","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BYK/xonsh","description":"xonsh is a Python-ish, BASHwards-compatible shell.","fork":true,"url":"https://api.github.com/repos/BYK/xonsh","forks_url":"https://api.github.com/repos/BYK/xonsh/forks","keys_url":"https://api.github.com/repos/BYK/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BYK/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BYK/xonsh/teams","hooks_url":"https://api.github.com/repos/BYK/xonsh/hooks","issue_events_url":"https://api.github.com/repos/BYK/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/BYK/xonsh/events","assignees_url":"https://api.github.com/repos/BYK/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/BYK/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/BYK/xonsh/tags","blobs_url":"https://api.github.com/repos/BYK/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BYK/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BYK/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/BYK/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BYK/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/BYK/xonsh/languages","stargazers_url":"https://api.github.com/repos/BYK/xonsh/stargazers","contributors_url":"https://api.github.com/repos/BYK/xonsh/contributors","subscribers_url":"https://api.github.com/repos/BYK/xonsh/subscribers","subscription_url":"https://api.github.com/repos/BYK/xonsh/subscription","commits_url":"https://api.github.com/repos/BYK/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/BYK/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/BYK/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/BYK/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/BYK/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/BYK/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BYK/xonsh/merges","archive_url":"https://api.github.com/repos/BYK/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BYK/xonsh/downloads","issues_url":"https://api.github.com/repos/BYK/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/BYK/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/BYK/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/BYK/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BYK/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/BYK/xonsh/releases{/id}","deployments_url":"https://api.github.com/repos/BYK/xonsh/deployments","created_at":"2015-06-18T07:58:38Z","updated_at":"2016-01-21T11:28:40Z","pushed_at":"2016-03-26T10:17:53Z","git_url":"git://github.com/BYK/xonsh.git","ssh_url":"git@github.com:BYK/xonsh.git","clone_url":"https://github.com/BYK/xonsh.git","svn_url":"https://github.com/BYK/xonsh","homepage":"http://xonsh.org","size":3931,"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":"da8a2bc23717ffc11f4a56b888d8327396292cc1","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-03-26T04:32:09Z","pushed_at":"2016-03-26T10:17:53Z","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":4859,"stargazers_count":754,"watchers_count":754,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":116,"forks":90,"open_issues":116,"watchers":754,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/751"},"html":{"href":"https://github.com/scopatz/xonsh/pull/751"},"issue":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/751"},"comments":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/751/comments"},"review_comments":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/751/comments"},"review_comment":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/751/commits"},"statuses":{"href":"https://api.github.com/repos/scopatz/xonsh/statuses/c5ec76df6dda0ed19f6b041903c1953f4e298a71"}}}}