{"action":"closed","issue":{"url":"https://api.github.com/repos/xonsh/xonsh/issues/1541","repository_url":"https://api.github.com/repos/xonsh/xonsh","labels_url":"https://api.github.com/repos/xonsh/xonsh/issues/1541/labels{/name}","comments_url":"https://api.github.com/repos/xonsh/xonsh/issues/1541/comments","events_url":"https://api.github.com/repos/xonsh/xonsh/issues/1541/events","html_url":"https://github.com/xonsh/xonsh/issues/1541","id":170201507,"number":1541,"title":"\"bin/some_binary\" parsing","user":{"login":"Droggelbecher","id":118525,"avatar_url":"https://avatars.githubusercontent.com/u/118525?v=3","gravatar_id":"","url":"https://api.github.com/users/Droggelbecher","html_url":"https://github.com/Droggelbecher","followers_url":"https://api.github.com/users/Droggelbecher/followers","following_url":"https://api.github.com/users/Droggelbecher/following{/other_user}","gists_url":"https://api.github.com/users/Droggelbecher/gists{/gist_id}","starred_url":"https://api.github.com/users/Droggelbecher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Droggelbecher/subscriptions","organizations_url":"https://api.github.com/users/Droggelbecher/orgs","repos_url":"https://api.github.com/users/Droggelbecher/repos","events_url":"https://api.github.com/users/Droggelbecher/events{/privacy}","received_events_url":"https://api.github.com/users/Droggelbecher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xonsh/xonsh/labels/feature","name":"feature","color":"009800"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/xonsh/xonsh/milestones/5","html_url":"https://github.com/xonsh/xonsh/milestones/v0.5","labels_url":"https://api.github.com/repos/xonsh/xonsh/milestones/5/labels","id":1848323,"number":5,"title":"v0.5","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":49,"closed_issues":185,"state":"open","created_at":"2016-06-25T15:59:08Z","updated_at":"2016-09-09T12:05:07Z","due_on":"2016-08-03T04:00:00Z","closed_at":null},"comments":5,"created_at":"2016-08-09T15:47:48Z","updated_at":"2016-09-09T12:05:07Z","closed_at":"2016-09-09T12:05:07Z","body":"I have several scripts under ~/bin, I have the habit of calling them from my home directory like this:\r\n\r\n```\r\nbin/some_script\r\n```\r\nThis gets parsed as python (as 'bin' exists and is the function that gives you a binary representation of an int).\r\nI don't know the exact rules by which this is decided but it seems that xonsh cares whether the first subexpression (\"bin\") is in the python namespace, but does not care for the rest (\"some_script\"), which seems odd. Is there a specific reason for this?\r\n\r\nNow I know there's several ways to avoid the issue such as\r\n```\r\n./bin/some_script\r\n~/bin/some_script\r\n![bin/some_script]\r\n...\r\n```\r\n\r\nI guess my questions on this are however:\r\n\r\n1. Is there any hope the xonsh parser will be smart enough to figure out that although \"bin/some_script\" is syntactically correct python it will not work and should be tried rather as a subprocess?\r\n2. Why is it that only the first subexpression is tested? Eg. \"foo/bar\" seems to be considered python iff \"foo\" is in the python namespace and doesn't care at all about \"bar\". Whats the rationale behind this?\r\n3. Would it be wise to do something like \"del bin\" in xonshrc?\r\n4. If I did that, how could I make bin still be available in (explicit) python mode? Preferrably without renaming it in order to not break scripts/code snippets/etc..."}}
{"actor":{"display_login":"laerus"}}