{"action":"created","comment":{"url":"https://api.github.com/repos/sharkdp/bat/pulls/comments/217163998","pull_request_review_id":154813136,"id":217163998,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzE2Mzk5OA==","diff_hunk":"@@ -430,26 +430,25 @@ impl App {\n                 [OutputComponent::Numbers].iter().cloned().collect()\n             } else if matches.is_present(\"plain\") {\n                 [OutputComponent::Plain].iter().cloned().collect()\n-            } else if matches.is_present(\"style\") {\n-                values_t!(matches.values_of(\"style\"), OutputComponent)?\n+            } else {\n+                let env_style_components: Option<Vec<OutputComponent>> =\n+                    transpose(env::var(\"BAT_STYLE\").ok().map(|style_str| {\n+                        style_str\n+                            .split(\",\")\n+                            .map(|x| OutputComponent::from_str(&x))\n+                            .collect::<Result<Vec<OutputComponent>>>()\n+                    }))?;\n+\n+                values_t!(matches.values_of(\"style\"), OutputComponent)\n+                    .ok()\n+                    .or(env_style_components)","path":"src/app.rs","position":41,"original_position":26,"commit_id":"63d32bc818b8a8375ddf70d069e7ee903b63d55c","original_commit_id":"dccf8d82212e24e9015e4346a3d7f9330051a6ff","user":{"login":"ms2300","id":15894971,"node_id":"MDQ6VXNlcjE1ODk0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/15894971?v=4","gravatar_id":"","url":"https://api.github.com/users/ms2300","html_url":"https://github.com/ms2300","followers_url":"https://api.github.com/users/ms2300/followers","following_url":"https://api.github.com/users/ms2300/following{/other_user}","gists_url":"https://api.github.com/users/ms2300/gists{/gist_id}","starred_url":"https://api.github.com/users/ms2300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms2300/subscriptions","organizations_url":"https://api.github.com/users/ms2300/orgs","repos_url":"https://api.github.com/users/ms2300/repos","events_url":"https://api.github.com/users/ms2300/events{/privacy}","received_events_url":"https://api.github.com/users/ms2300/received_events","type":"User","site_admin":false},"body":"I mean I just try to help out because I like using bat and your change was clearly for the better, it's all good. I learn something new every time as well so thank you!","created_at":"2018-09-12T19:44:30Z","updated_at":"2018-09-12T19:44:30Z","html_url":"https://github.com/sharkdp/bat/pull/298#discussion_r217163998","pull_request_url":"https://api.github.com/repos/sharkdp/bat/pulls/298","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/comments/217163998"},"html":{"href":"https://github.com/sharkdp/bat/pull/298#discussion_r217163998"},"pull_request":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/298"}},"in_reply_to_id":217162815},"pull_request":{"url":"https://api.github.com/repos/sharkdp/bat/pulls/298","id":214174311,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTc0MzEx","html_url":"https://github.com/sharkdp/bat/pull/298","diff_url":"https://github.com/sharkdp/bat/pull/298.diff","patch_url":"https://github.com/sharkdp/bat/pull/298.patch","issue_url":"https://api.github.com/repos/sharkdp/bat/issues/298","number":298,"state":"open","locked":false,"title":"#208 Added BAT_STYLE env variable functionality","user":{"login":"ms2300","id":15894971,"node_id":"MDQ6VXNlcjE1ODk0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/15894971?v=4","gravatar_id":"","url":"https://api.github.com/users/ms2300","html_url":"https://github.com/ms2300","followers_url":"https://api.github.com/users/ms2300/followers","following_url":"https://api.github.com/users/ms2300/following{/other_user}","gists_url":"https://api.github.com/users/ms2300/gists{/gist_id}","starred_url":"https://api.github.com/users/ms2300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms2300/subscriptions","organizations_url":"https://api.github.com/users/ms2300/orgs","repos_url":"https://api.github.com/users/ms2300/repos","events_url":"https://api.github.com/users/ms2300/events{/privacy}","received_events_url":"https://api.github.com/users/ms2300/received_events","type":"User","site_admin":false},"body":"If an environmental variable of bat style is present then the style will be set accordingly every time while still maintaining ability to change style with --style or a variant of that. #208 \r\n\r\nEdit: I don't necessarily like adding more and more else if statements to that area of code and spent the majority of time trying to clean it up but this was seemed like the best strategy to me ... all reviewing is very welcome.","created_at":"2018-09-10T00:31:00Z","updated_at":"2018-09-12T19:44:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26d34a7d77b6612da44da85cd5039d9124f57fde","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sharkdp/bat/pulls/298/commits","review_comments_url":"https://api.github.com/repos/sharkdp/bat/pulls/298/comments","review_comment_url":"https://api.github.com/repos/sharkdp/bat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharkdp/bat/issues/298/comments","statuses_url":"https://api.github.com/repos/sharkdp/bat/statuses/63d32bc818b8a8375ddf70d069e7ee903b63d55c","head":{"label":"ms2300:bat_style","ref":"bat_style","sha":"63d32bc818b8a8375ddf70d069e7ee903b63d55c","user":{"login":"ms2300","id":15894971,"node_id":"MDQ6VXNlcjE1ODk0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/15894971?v=4","gravatar_id":"","url":"https://api.github.com/users/ms2300","html_url":"https://github.com/ms2300","followers_url":"https://api.github.com/users/ms2300/followers","following_url":"https://api.github.com/users/ms2300/following{/other_user}","gists_url":"https://api.github.com/users/ms2300/gists{/gist_id}","starred_url":"https://api.github.com/users/ms2300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms2300/subscriptions","organizations_url":"https://api.github.com/users/ms2300/orgs","repos_url":"https://api.github.com/users/ms2300/repos","events_url":"https://api.github.com/users/ms2300/events{/privacy}","received_events_url":"https://api.github.com/users/ms2300/received_events","type":"User","site_admin":false},"repo":{"id":148067286,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgwNjcyODY=","name":"bat","full_name":"ms2300/bat","owner":{"login":"ms2300","id":15894971,"node_id":"MDQ6VXNlcjE1ODk0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/15894971?v=4","gravatar_id":"","url":"https://api.github.com/users/ms2300","html_url":"https://github.com/ms2300","followers_url":"https://api.github.com/users/ms2300/followers","following_url":"https://api.github.com/users/ms2300/following{/other_user}","gists_url":"https://api.github.com/users/ms2300/gists{/gist_id}","starred_url":"https://api.github.com/users/ms2300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms2300/subscriptions","organizations_url":"https://api.github.com/users/ms2300/orgs","repos_url":"https://api.github.com/users/ms2300/repos","events_url":"https://api.github.com/users/ms2300/events{/privacy}","received_events_url":"https://api.github.com/users/ms2300/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ms2300/bat","description":"A cat(1) clone with wings.","fork":true,"url":"https://api.github.com/repos/ms2300/bat","forks_url":"https://api.github.com/repos/ms2300/bat/forks","keys_url":"https://api.github.com/repos/ms2300/bat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ms2300/bat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ms2300/bat/teams","hooks_url":"https://api.github.com/repos/ms2300/bat/hooks","issue_events_url":"https://api.github.com/repos/ms2300/bat/issues/events{/number}","events_url":"https://api.github.com/repos/ms2300/bat/events","assignees_url":"https://api.github.com/repos/ms2300/bat/assignees{/user}","branches_url":"https://api.github.com/repos/ms2300/bat/branches{/branch}","tags_url":"https://api.github.com/repos/ms2300/bat/tags","blobs_url":"https://api.github.com/repos/ms2300/bat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ms2300/bat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ms2300/bat/git/refs{/sha}","trees_url":"https://api.github.com/repos/ms2300/bat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ms2300/bat/statuses/{sha}","languages_url":"https://api.github.com/repos/ms2300/bat/languages","stargazers_url":"https://api.github.com/repos/ms2300/bat/stargazers","contributors_url":"https://api.github.com/repos/ms2300/bat/contributors","subscribers_url":"https://api.github.com/repos/ms2300/bat/subscribers","subscription_url":"https://api.github.com/repos/ms2300/bat/subscription","commits_url":"https://api.github.com/repos/ms2300/bat/commits{/sha}","git_commits_url":"https://api.github.com/repos/ms2300/bat/git/commits{/sha}","comments_url":"https://api.github.com/repos/ms2300/bat/comments{/number}","issue_comment_url":"https://api.github.com/repos/ms2300/bat/issues/comments{/number}","contents_url":"https://api.github.com/repos/ms2300/bat/contents/{+path}","compare_url":"https://api.github.com/repos/ms2300/bat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ms2300/bat/merges","archive_url":"https://api.github.com/repos/ms2300/bat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ms2300/bat/downloads","issues_url":"https://api.github.com/repos/ms2300/bat/issues{/number}","pulls_url":"https://api.github.com/repos/ms2300/bat/pulls{/number}","milestones_url":"https://api.github.com/repos/ms2300/bat/milestones{/number}","notifications_url":"https://api.github.com/repos/ms2300/bat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ms2300/bat/labels{/name}","releases_url":"https://api.github.com/repos/ms2300/bat/releases{/id}","deployments_url":"https://api.github.com/repos/ms2300/bat/deployments","created_at":"2018-09-09T21:27:56Z","updated_at":"2018-09-09T21:27:59Z","pushed_at":"2018-09-12T19:41:08Z","git_url":"git://github.com/ms2300/bat.git","ssh_url":"git@github.com:ms2300/bat.git","clone_url":"https://github.com/ms2300/bat.git","svn_url":"https://github.com/ms2300/bat","homepage":"","size":4901,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sharkdp:master","ref":"master","sha":"97129ab9d8b249611b31740ad597452079458afc","user":{"login":"sharkdp","id":4209276,"node_id":"MDQ6VXNlcjQyMDkyNzY=","avatar_url":"https://avatars2.githubusercontent.com/u/4209276?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkdp","html_url":"https://github.com/sharkdp","followers_url":"https://api.github.com/users/sharkdp/followers","following_url":"https://api.github.com/users/sharkdp/following{/other_user}","gists_url":"https://api.github.com/users/sharkdp/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkdp/subscriptions","organizations_url":"https://api.github.com/users/sharkdp/orgs","repos_url":"https://api.github.com/users/sharkdp/repos","events_url":"https://api.github.com/users/sharkdp/events{/privacy}","received_events_url":"https://api.github.com/users/sharkdp/received_events","type":"User","site_admin":false},"repo":{"id":130464961,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA0NjQ5NjE=","name":"bat","full_name":"sharkdp/bat","owner":{"login":"sharkdp","id":4209276,"node_id":"MDQ6VXNlcjQyMDkyNzY=","avatar_url":"https://avatars2.githubusercontent.com/u/4209276?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkdp","html_url":"https://github.com/sharkdp","followers_url":"https://api.github.com/users/sharkdp/followers","following_url":"https://api.github.com/users/sharkdp/following{/other_user}","gists_url":"https://api.github.com/users/sharkdp/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkdp/subscriptions","organizations_url":"https://api.github.com/users/sharkdp/orgs","repos_url":"https://api.github.com/users/sharkdp/repos","events_url":"https://api.github.com/users/sharkdp/events{/privacy}","received_events_url":"https://api.github.com/users/sharkdp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sharkdp/bat","description":"A cat(1) clone with wings.","fork":false,"url":"https://api.github.com/repos/sharkdp/bat","forks_url":"https://api.github.com/repos/sharkdp/bat/forks","keys_url":"https://api.github.com/repos/sharkdp/bat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharkdp/bat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharkdp/bat/teams","hooks_url":"https://api.github.com/repos/sharkdp/bat/hooks","issue_events_url":"https://api.github.com/repos/sharkdp/bat/issues/events{/number}","events_url":"https://api.github.com/repos/sharkdp/bat/events","assignees_url":"https://api.github.com/repos/sharkdp/bat/assignees{/user}","branches_url":"https://api.github.com/repos/sharkdp/bat/branches{/branch}","tags_url":"https://api.github.com/repos/sharkdp/bat/tags","blobs_url":"https://api.github.com/repos/sharkdp/bat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharkdp/bat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharkdp/bat/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharkdp/bat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharkdp/bat/statuses/{sha}","languages_url":"https://api.github.com/repos/sharkdp/bat/languages","stargazers_url":"https://api.github.com/repos/sharkdp/bat/stargazers","contributors_url":"https://api.github.com/repos/sharkdp/bat/contributors","subscribers_url":"https://api.github.com/repos/sharkdp/bat/subscribers","subscription_url":"https://api.github.com/repos/sharkdp/bat/subscription","commits_url":"https://api.github.com/repos/sharkdp/bat/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharkdp/bat/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharkdp/bat/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharkdp/bat/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharkdp/bat/contents/{+path}","compare_url":"https://api.github.com/repos/sharkdp/bat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharkdp/bat/merges","archive_url":"https://api.github.com/repos/sharkdp/bat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharkdp/bat/downloads","issues_url":"https://api.github.com/repos/sharkdp/bat/issues{/number}","pulls_url":"https://api.github.com/repos/sharkdp/bat/pulls{/number}","milestones_url":"https://api.github.com/repos/sharkdp/bat/milestones{/number}","notifications_url":"https://api.github.com/repos/sharkdp/bat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharkdp/bat/labels{/name}","releases_url":"https://api.github.com/repos/sharkdp/bat/releases{/id}","deployments_url":"https://api.github.com/repos/sharkdp/bat/deployments","created_at":"2018-04-21T10:52:23Z","updated_at":"2018-09-12T19:34:20Z","pushed_at":"2018-09-12T19:41:09Z","git_url":"git://github.com/sharkdp/bat.git","ssh_url":"git@github.com:sharkdp/bat.git","clone_url":"https://github.com/sharkdp/bat.git","svn_url":"https://github.com/sharkdp/bat","homepage":"","size":4897,"stargazers_count":8027,"watchers_count":8027,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":135,"open_issues":25,"watchers":8027,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/298"},"html":{"href":"https://github.com/sharkdp/bat/pull/298"},"issue":{"href":"https://api.github.com/repos/sharkdp/bat/issues/298"},"comments":{"href":"https://api.github.com/repos/sharkdp/bat/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/sharkdp/bat/statuses/63d32bc818b8a8375ddf70d069e7ee903b63d55c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ms2300"}}