{"action":"created","comment":{"url":"https://api.github.com/repos/danReynolds/Splash/pulls/comments/34417340","id":34417340,"diff_hunk":"@@ -0,0 +1,68 @@\n+use env::UserEnv;\n+use std::env;\n+use tokenizer::AST;\n+\n+fn expand_arg(arg: AST, user_env: &UserEnv) -> AST {\n+    match arg {\n+        AST::Var(v) => {\n+            let s = user_env.vars\n+                .get(&v)\n+                .map(|value| value.clone())\n+                .unwrap_or_else(|| {\n+                    env::var(&v)\n+                    .unwrap_or(\"\".to_string())","path":"src/interpolate.rs","position":13,"original_position":13,"commit_id":"255515eb19367fca7e079bc27029f4d33184647b","original_commit_id":"255515eb19367fca7e079bc27029f4d33184647b","user":{"login":"nikklassen","id":3314933,"avatar_url":"https://avatars.githubusercontent.com/u/3314933?v=3","gravatar_id":"","url":"https://api.github.com/users/nikklassen","html_url":"https://github.com/nikklassen","followers_url":"https://api.github.com/users/nikklassen/followers","following_url":"https://api.github.com/users/nikklassen/following{/other_user}","gists_url":"https://api.github.com/users/nikklassen/gists{/gist_id}","starred_url":"https://api.github.com/users/nikklassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikklassen/subscriptions","organizations_url":"https://api.github.com/users/nikklassen/orgs","repos_url":"https://api.github.com/users/nikklassen/repos","events_url":"https://api.github.com/users/nikklassen/events{/privacy}","received_events_url":"https://api.github.com/users/nikklassen/received_events","type":"User","site_admin":false},"body":"Use String::from","created_at":"2015-07-11T23:48:27Z","updated_at":"2015-07-11T23:48:27Z","html_url":"https://github.com/danReynolds/Splash/pull/36#discussion_r34417340","pull_request_url":"https://api.github.com/repos/danReynolds/Splash/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/comments/34417340"},"html":{"href":"https://github.com/danReynolds/Splash/pull/36#discussion_r34417340"},"pull_request":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/danReynolds/Splash/pulls/36","id":39214854,"html_url":"https://github.com/danReynolds/Splash/pull/36","diff_url":"https://github.com/danReynolds/Splash/pull/36.diff","patch_url":"https://github.com/danReynolds/Splash/pull/36.patch","issue_url":"https://api.github.com/repos/danReynolds/Splash/issues/36","number":36,"state":"open","locked":false,"title":"Add rewrite parser to include strings and vars","user":{"login":"nikklassen","id":3314933,"avatar_url":"https://avatars.githubusercontent.com/u/3314933?v=3","gravatar_id":"","url":"https://api.github.com/users/nikklassen","html_url":"https://github.com/nikklassen","followers_url":"https://api.github.com/users/nikklassen/followers","following_url":"https://api.github.com/users/nikklassen/following{/other_user}","gists_url":"https://api.github.com/users/nikklassen/gists{/gist_id}","starred_url":"https://api.github.com/users/nikklassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikklassen/subscriptions","organizations_url":"https://api.github.com/users/nikklassen/orgs","repos_url":"https://api.github.com/users/nikklassen/repos","events_url":"https://api.github.com/users/nikklassen/events{/privacy}","received_events_url":"https://api.github.com/users/nikklassen/received_events","type":"User","site_admin":false},"body":"This works towards #29. It adds strings and env vars but no user vars yet","created_at":"2015-07-05T01:18:10Z","updated_at":"2015-07-11T23:48:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a25d8eff157a796f7fcbde6d1c327b55c47094b3","assignee":{"login":"danReynolds","id":2192930,"avatar_url":"https://avatars.githubusercontent.com/u/2192930?v=3","gravatar_id":"","url":"https://api.github.com/users/danReynolds","html_url":"https://github.com/danReynolds","followers_url":"https://api.github.com/users/danReynolds/followers","following_url":"https://api.github.com/users/danReynolds/following{/other_user}","gists_url":"https://api.github.com/users/danReynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/danReynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danReynolds/subscriptions","organizations_url":"https://api.github.com/users/danReynolds/orgs","repos_url":"https://api.github.com/users/danReynolds/repos","events_url":"https://api.github.com/users/danReynolds/events{/privacy}","received_events_url":"https://api.github.com/users/danReynolds/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/danReynolds/Splash/pulls/36/commits","review_comments_url":"https://api.github.com/repos/danReynolds/Splash/pulls/36/comments","review_comment_url":"https://api.github.com/repos/danReynolds/Splash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danReynolds/Splash/issues/36/comments","statuses_url":"https://api.github.com/repos/danReynolds/Splash/statuses/255515eb19367fca7e079bc27029f4d33184647b","head":{"label":"danReynolds:vars","ref":"vars","sha":"255515eb19367fca7e079bc27029f4d33184647b","user":{"login":"danReynolds","id":2192930,"avatar_url":"https://avatars.githubusercontent.com/u/2192930?v=3","gravatar_id":"","url":"https://api.github.com/users/danReynolds","html_url":"https://github.com/danReynolds","followers_url":"https://api.github.com/users/danReynolds/followers","following_url":"https://api.github.com/users/danReynolds/following{/other_user}","gists_url":"https://api.github.com/users/danReynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/danReynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danReynolds/subscriptions","organizations_url":"https://api.github.com/users/danReynolds/orgs","repos_url":"https://api.github.com/users/danReynolds/repos","events_url":"https://api.github.com/users/danReynolds/events{/privacy}","received_events_url":"https://api.github.com/users/danReynolds/received_events","type":"User","site_admin":false},"repo":{"id":36906680,"name":"Splash","full_name":"danReynolds/Splash","owner":{"login":"danReynolds","id":2192930,"avatar_url":"https://avatars.githubusercontent.com/u/2192930?v=3","gravatar_id":"","url":"https://api.github.com/users/danReynolds","html_url":"https://github.com/danReynolds","followers_url":"https://api.github.com/users/danReynolds/followers","following_url":"https://api.github.com/users/danReynolds/following{/other_user}","gists_url":"https://api.github.com/users/danReynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/danReynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danReynolds/subscriptions","organizations_url":"https://api.github.com/users/danReynolds/orgs","repos_url":"https://api.github.com/users/danReynolds/repos","events_url":"https://api.github.com/users/danReynolds/events{/privacy}","received_events_url":"https://api.github.com/users/danReynolds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danReynolds/Splash","description":"A Systems Programming Language Shell written in Rust, a systems programming language.","fork":false,"url":"https://api.github.com/repos/danReynolds/Splash","forks_url":"https://api.github.com/repos/danReynolds/Splash/forks","keys_url":"https://api.github.com/repos/danReynolds/Splash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danReynolds/Splash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danReynolds/Splash/teams","hooks_url":"https://api.github.com/repos/danReynolds/Splash/hooks","issue_events_url":"https://api.github.com/repos/danReynolds/Splash/issues/events{/number}","events_url":"https://api.github.com/repos/danReynolds/Splash/events","assignees_url":"https://api.github.com/repos/danReynolds/Splash/assignees{/user}","branches_url":"https://api.github.com/repos/danReynolds/Splash/branches{/branch}","tags_url":"https://api.github.com/repos/danReynolds/Splash/tags","blobs_url":"https://api.github.com/repos/danReynolds/Splash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danReynolds/Splash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danReynolds/Splash/git/refs{/sha}","trees_url":"https://api.github.com/repos/danReynolds/Splash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danReynolds/Splash/statuses/{sha}","languages_url":"https://api.github.com/repos/danReynolds/Splash/languages","stargazers_url":"https://api.github.com/repos/danReynolds/Splash/stargazers","contributors_url":"https://api.github.com/repos/danReynolds/Splash/contributors","subscribers_url":"https://api.github.com/repos/danReynolds/Splash/subscribers","subscription_url":"https://api.github.com/repos/danReynolds/Splash/subscription","commits_url":"https://api.github.com/repos/danReynolds/Splash/commits{/sha}","git_commits_url":"https://api.github.com/repos/danReynolds/Splash/git/commits{/sha}","comments_url":"https://api.github.com/repos/danReynolds/Splash/comments{/number}","issue_comment_url":"https://api.github.com/repos/danReynolds/Splash/issues/comments{/number}","contents_url":"https://api.github.com/repos/danReynolds/Splash/contents/{+path}","compare_url":"https://api.github.com/repos/danReynolds/Splash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danReynolds/Splash/merges","archive_url":"https://api.github.com/repos/danReynolds/Splash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danReynolds/Splash/downloads","issues_url":"https://api.github.com/repos/danReynolds/Splash/issues{/number}","pulls_url":"https://api.github.com/repos/danReynolds/Splash/pulls{/number}","milestones_url":"https://api.github.com/repos/danReynolds/Splash/milestones{/number}","notifications_url":"https://api.github.com/repos/danReynolds/Splash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danReynolds/Splash/labels{/name}","releases_url":"https://api.github.com/repos/danReynolds/Splash/releases{/id}","created_at":"2015-06-05T02:11:23Z","updated_at":"2015-06-23T05:11:52Z","pushed_at":"2015-07-10T06:37:57Z","git_url":"git://github.com/danReynolds/Splash.git","ssh_url":"git@github.com:danReynolds/Splash.git","clone_url":"https://github.com/danReynolds/Splash.git","svn_url":"https://github.com/danReynolds/Splash","homepage":null,"size":267,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":22,"forks":1,"open_issues":22,"watchers":2,"default_branch":"master"}},"base":{"label":"danReynolds:master","ref":"master","sha":"9558499d33e3e24f7f2a75b271ed44db545c31c8","user":{"login":"danReynolds","id":2192930,"avatar_url":"https://avatars.githubusercontent.com/u/2192930?v=3","gravatar_id":"","url":"https://api.github.com/users/danReynolds","html_url":"https://github.com/danReynolds","followers_url":"https://api.github.com/users/danReynolds/followers","following_url":"https://api.github.com/users/danReynolds/following{/other_user}","gists_url":"https://api.github.com/users/danReynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/danReynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danReynolds/subscriptions","organizations_url":"https://api.github.com/users/danReynolds/orgs","repos_url":"https://api.github.com/users/danReynolds/repos","events_url":"https://api.github.com/users/danReynolds/events{/privacy}","received_events_url":"https://api.github.com/users/danReynolds/received_events","type":"User","site_admin":false},"repo":{"id":36906680,"name":"Splash","full_name":"danReynolds/Splash","owner":{"login":"danReynolds","id":2192930,"avatar_url":"https://avatars.githubusercontent.com/u/2192930?v=3","gravatar_id":"","url":"https://api.github.com/users/danReynolds","html_url":"https://github.com/danReynolds","followers_url":"https://api.github.com/users/danReynolds/followers","following_url":"https://api.github.com/users/danReynolds/following{/other_user}","gists_url":"https://api.github.com/users/danReynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/danReynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danReynolds/subscriptions","organizations_url":"https://api.github.com/users/danReynolds/orgs","repos_url":"https://api.github.com/users/danReynolds/repos","events_url":"https://api.github.com/users/danReynolds/events{/privacy}","received_events_url":"https://api.github.com/users/danReynolds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danReynolds/Splash","description":"A Systems Programming Language Shell written in Rust, a systems programming language.","fork":false,"url":"https://api.github.com/repos/danReynolds/Splash","forks_url":"https://api.github.com/repos/danReynolds/Splash/forks","keys_url":"https://api.github.com/repos/danReynolds/Splash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danReynolds/Splash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danReynolds/Splash/teams","hooks_url":"https://api.github.com/repos/danReynolds/Splash/hooks","issue_events_url":"https://api.github.com/repos/danReynolds/Splash/issues/events{/number}","events_url":"https://api.github.com/repos/danReynolds/Splash/events","assignees_url":"https://api.github.com/repos/danReynolds/Splash/assignees{/user}","branches_url":"https://api.github.com/repos/danReynolds/Splash/branches{/branch}","tags_url":"https://api.github.com/repos/danReynolds/Splash/tags","blobs_url":"https://api.github.com/repos/danReynolds/Splash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danReynolds/Splash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danReynolds/Splash/git/refs{/sha}","trees_url":"https://api.github.com/repos/danReynolds/Splash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danReynolds/Splash/statuses/{sha}","languages_url":"https://api.github.com/repos/danReynolds/Splash/languages","stargazers_url":"https://api.github.com/repos/danReynolds/Splash/stargazers","contributors_url":"https://api.github.com/repos/danReynolds/Splash/contributors","subscribers_url":"https://api.github.com/repos/danReynolds/Splash/subscribers","subscription_url":"https://api.github.com/repos/danReynolds/Splash/subscription","commits_url":"https://api.github.com/repos/danReynolds/Splash/commits{/sha}","git_commits_url":"https://api.github.com/repos/danReynolds/Splash/git/commits{/sha}","comments_url":"https://api.github.com/repos/danReynolds/Splash/comments{/number}","issue_comment_url":"https://api.github.com/repos/danReynolds/Splash/issues/comments{/number}","contents_url":"https://api.github.com/repos/danReynolds/Splash/contents/{+path}","compare_url":"https://api.github.com/repos/danReynolds/Splash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danReynolds/Splash/merges","archive_url":"https://api.github.com/repos/danReynolds/Splash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danReynolds/Splash/downloads","issues_url":"https://api.github.com/repos/danReynolds/Splash/issues{/number}","pulls_url":"https://api.github.com/repos/danReynolds/Splash/pulls{/number}","milestones_url":"https://api.github.com/repos/danReynolds/Splash/milestones{/number}","notifications_url":"https://api.github.com/repos/danReynolds/Splash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danReynolds/Splash/labels{/name}","releases_url":"https://api.github.com/repos/danReynolds/Splash/releases{/id}","created_at":"2015-06-05T02:11:23Z","updated_at":"2015-06-23T05:11:52Z","pushed_at":"2015-07-10T06:37:57Z","git_url":"git://github.com/danReynolds/Splash.git","ssh_url":"git@github.com:danReynolds/Splash.git","clone_url":"https://github.com/danReynolds/Splash.git","svn_url":"https://github.com/danReynolds/Splash","homepage":null,"size":267,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":22,"forks":1,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/36"},"html":{"href":"https://github.com/danReynolds/Splash/pull/36"},"issue":{"href":"https://api.github.com/repos/danReynolds/Splash/issues/36"},"comments":{"href":"https://api.github.com/repos/danReynolds/Splash/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danReynolds/Splash/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/danReynolds/Splash/statuses/255515eb19367fca7e079bc27029f4d33184647b"}}}}