{"action":"created","comment":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/26444623","id":26444623,"diff_hunk":"@@ -45,7 +45,13 @@ def __init__(self, *args, **kwargs):\n         if len(args) == 0 and len(kwargs) == 0:\n             args = (os.environ,)\n         for key, val in dict(*args, **kwargs).items():\n-            self[key] = val\n+            if is_function_string(val):\n+                if key in (ENV or {}):","path":"xonsh/built_ins.py","position":18,"original_position":18,"commit_id":"65cfc7c96d92daad2b18472b207afd4bbbeb4b50","original_commit_id":"65cfc7c96d92daad2b18472b207afd4bbbeb4b50","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":"It is much faster (and more explicit) for this to be `if ENV is None or key in ENV`","created_at":"2015-03-15T05:08:40Z","updated_at":"2015-03-15T05:08:40Z","html_url":"https://github.com/scopatz/xonsh/pull/37#discussion_r26444623","pull_request_url":"https://api.github.com/repos/scopatz/xonsh/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments/26444623"},"html":{"href":"https://github.com/scopatz/xonsh/pull/37#discussion_r26444623"},"pull_request":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/37","id":31176749,"html_url":"https://github.com/scopatz/xonsh/pull/37","diff_url":"https://github.com/scopatz/xonsh/pull/37.diff","patch_url":"https://github.com/scopatz/xonsh/pull/37.patch","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/37","number":37,"state":"open","locked":false,"title":"Attempt to fix #34","user":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"body":"I was looking for a fix for #34, and the following has worked for me.  I am honestly not quite sure how things are fitting together here as far as the terminal emulators I have tried, but my current hypothesis is that they actually rely on the `PROMPT` environment variable, and of course they don't know how to interpret it as a Python function.  My proposed solution is to move the xonsh prompt to a variable called `XONSH_PROMPT`, and use that to update a string `PROMPT` (again, a bit hackish, but it seems to work).\r\n\r\nI am not sure how best to reconcile this with #31, or whether this is even a change worth making.  What do you think?","created_at":"2015-03-14T02:24:37Z","updated_at":"2015-03-15T05:08:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac27251a383fc58c94fcdce4fff0b115da74c2bc","assignee":null,"milestone":{"url":"https://api.github.com/repos/scopatz/xonsh/milestones/1","html_url":"https://github.com/scopatz/xonsh/milestones/v0.2","labels_url":"https://api.github.com/repos/scopatz/xonsh/milestones/1/labels","id":1013181,"number":1,"title":"v0.2","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":8,"closed_issues":28,"state":"open","created_at":"2015-03-09T18:29:10Z","updated_at":"2015-03-15T05:03:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/scopatz/xonsh/pulls/37/commits","review_comments_url":"https://api.github.com/repos/scopatz/xonsh/pulls/37/comments","review_comment_url":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/37/comments","statuses_url":"https://api.github.com/repos/scopatz/xonsh/statuses/65cfc7c96d92daad2b18472b207afd4bbbeb4b50","head":{"label":"wrywerytwreywery:virtual_terminal_fixes","ref":"virtual_terminal_fixes","sha":"65cfc7c96d92daad2b18472b207afd4bbbeb4b50","user":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"repo":{"id":32187841,"name":"xonsh","full_name":"wrywerytwreywery/xonsh","owner":{"login":"wrywerytwreywery","id":549404,"avatar_url":"https://avatars.githubusercontent.com/u/549404?v=3","gravatar_id":"","url":"https://api.github.com/users/wrywerytwreywery","html_url":"https://github.com/wrywerytwreywery","followers_url":"https://api.github.com/users/wrywerytwreywery/followers","following_url":"https://api.github.com/users/wrywerytwreywery/following{/other_user}","gists_url":"https://api.github.com/users/wrywerytwreywery/gists{/gist_id}","starred_url":"https://api.github.com/users/wrywerytwreywery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrywerytwreywery/subscriptions","organizations_url":"https://api.github.com/users/wrywerytwreywery/orgs","repos_url":"https://api.github.com/users/wrywerytwreywery/repos","events_url":"https://api.github.com/users/wrywerytwreywery/events{/privacy}","received_events_url":"https://api.github.com/users/wrywerytwreywery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wrywerytwreywery/xonsh","description":"xonsh is a Python-ish, BASHwards-compatible shell.","fork":true,"url":"https://api.github.com/repos/wrywerytwreywery/xonsh","forks_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/forks","keys_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/teams","hooks_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/hooks","issue_events_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/events","assignees_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/tags","blobs_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/languages","stargazers_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/stargazers","contributors_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/contributors","subscribers_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/subscribers","subscription_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/subscription","commits_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/merges","archive_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/downloads","issues_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/wrywerytwreywery/xonsh/releases{/id}","created_at":"2015-03-14T00:10:49Z","updated_at":"2015-03-14T00:10:50Z","pushed_at":"2015-03-15T04:04:24Z","git_url":"git://github.com/wrywerytwreywery/xonsh.git","ssh_url":"git@github.com:wrywerytwreywery/xonsh.git","clone_url":"https://github.com/wrywerytwreywery/xonsh.git","svn_url":"https://github.com/wrywerytwreywery/xonsh","homepage":"http://xonsh.org","size":2119,"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":"d84140e1cd35db9756d71410046827b49aae6590","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-compatible 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}","created_at":"2015-01-21T22:05:27Z","updated_at":"2015-03-15T05:03:28Z","pushed_at":"2015-03-15T05:03:28Z","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://xonsh.org","size":2119,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":11,"forks":8,"open_issues":11,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/37"},"html":{"href":"https://github.com/scopatz/xonsh/pull/37"},"issue":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/37"},"comments":{"href":"https://api.github.com/repos/scopatz/xonsh/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scopatz/xonsh/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/scopatz/xonsh/statuses/65cfc7c96d92daad2b18472b207afd4bbbeb4b50"}}}}