{"action":"created","comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments/88984650","pull_request_review_id":9539124,"id":88984650,"diff_hunk":"@@ -23,58 +22,58 @@ function help --description 'Show help for the fish shell'\n \t# by the help function defined below.\n \t#\n \tset -l graphical_browsers htmlview x-www-browser firefox galeon mozilla konqueror epiphany opera netscape rekonq google-chrome chromium-browser\n-\tset -l text_browsers htmlview www-browser links elinks lynx w3m\n \n-\tif type -q \"$BROWSER\"\n-\t\t# User has manually set a preferred browser, so we respect that\n-\t\tset fish_browser $BROWSER\n-\n-\t\t# If browser is known to be graphical, put into background\n-\t\tif contains -- $BROWSER $graphical_browsers\n-\t\t\tset fish_browser_bg 1\n-\t\tend\n+\tif type -q \"$fish_help_browser[1]\"\n+\t\t# User has set a fish-specific help browser. This overrides the\n+\t\t# browser that may be defined by $BROWSER. The $fish_help_browser\n+\t\t# variable may be an array containing a browser name plus options.\n+\t\tset fish_browser $fish_help_browser\n \telse\n-\t\t# Check for a text-based browser.\n-\t\tfor i in $text_browsers\n-\t\t\tif type -q -f $i\n-\t\t\t\tset fish_browser $i\n-\t\t\t\tbreak\n-\t\t\tend\n-\t\tend\n-\n-\t\t# If we are in a graphical environment, check if there is a graphical\n-\t\t# browser to use instead.\n-\t\tif test \"$DISPLAY\" -a \\( \"$XAUTHORITY\" = \"$HOME/.Xauthority\" -o \"$XAUTHORITY\" = \"\" \\)\n-\t\t\tfor i in $graphical_browsers\n+\t\tset -l text_browsers htmlview www-browser links elinks lynx w3m\n+\n+\t\tif type -q \"$BROWSER\"\n+\t\t\t# User has manually set a preferred browser, so we respect that\n+\t\t\tset fish_browser $BROWSER\n+\t\telse\n+\t\t\t# Check for a text-based browser.\n+\t\t\tfor i in $text_browsers\n \t\t\t\tif type -q -f $i\n \t\t\t\t\tset fish_browser $i\n-\t\t\t\t\tset fish_browser_bg 1\n \t\t\t\t\tbreak\n \t\t\t\tend\n \t\t\tend\n-\t\tend\n-\n-\t\t# If the OS appears to be Windows (graphical), try to use cygstart\n-\t\tif type -q cygstart\n-\t\t\tset fish_browser cygstart\n-\t\t# If xdg-open is available, just use that\n-\t\telse if type -q xdg-open\n-\t\t\tset fish_browser xdg-open\n-\t\tend\n \t\n+\t\t\t# If we are in a graphical environment, check if there is a graphical\n+\t\t\t# browser to use instead.\n+\t\t\tif test \"$DISPLAY\" -a \\( \"$XAUTHORITY\" = \"$HOME/.Xauthority\" -o \"$XAUTHORITY\" = \"\" \\)\n+\t\t\t\tfor i in $graphical_browsers\n+\t\t\t\t\tif type -q -f $i\n+\t\t\t\t\t\tset fish_browser $i\n+\t\t\t\t\t\tbreak\n+\t\t\t\t\tend\n+\t\t\t\tend\n+\t\t\tend\n+\n+\t\t\t# If the OS appears to be Windows (graphical), try to use cygstart\n+\t\t\tif type -q cygstart\n+\t\t\t\tset fish_browser cygstart\n+\t\t\t# If xdg-open is available, just use that\n+\t\t\telse if type -q xdg-open\n+\t\t\t\tset fish_browser xdg-open\n+\t\t\tend\n \t\n-\t\t# On OS X, we go through osascript by default\n-\t\tif test (uname) = Darwin\n-\t\t\tif type -q osascript\n-\t\t\t\tset fish_browser osascript\n+\t\t\t# On OS X, we go through osascript by default\n+\t\t\tif test (uname) = Darwin\n+\t\t\t\tif type -q osascript\n+\t\t\t\t\tset fish_browser osascript\n+\t\t\t\tend\n \t\t\tend\n \t\tend\n-\n \tend\n \n-\tif test -z $fish_browser\n+\tif test -z $fish_browser[1]","path":"share/functions/help.fish","position":98,"original_position":98,"commit_id":"1a1ada56f462821bd3c06062eba7743a33447095","original_commit_id":"1a1ada56f462821bd3c06062eba7743a33447095","user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"body":"You should always quote the argument to `test -z` and `test -n`. But in this instance it's better to do it the fish way: `if set -q fish_browser[1]`.","created_at":"2016-11-21T20:50:12Z","updated_at":"2016-11-21T20:59:11Z","html_url":"https://github.com/fish-shell/fish-shell/pull/3484#discussion_r88984650","pull_request_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484","_links":{"self":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments/88984650"},"html":{"href":"https://github.com/fish-shell/fish-shell/pull/3484#discussion_r88984650"},"pull_request":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484"}}},"pull_request":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484","id":90538246,"html_url":"https://github.com/fish-shell/fish-shell/pull/3484","diff_url":"https://github.com/fish-shell/fish-shell/pull/3484.diff","patch_url":"https://github.com/fish-shell/fish-shell/pull/3484.patch","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3484","number":3484,"state":"open","locked":false,"title":"#3131: Allow help browser to be chosen independent of web-browser env…","user":{"login":"TieDyedDevil","id":4656502,"avatar_url":"https://avatars.githubusercontent.com/u/4656502?v=3","gravatar_id":"","url":"https://api.github.com/users/TieDyedDevil","html_url":"https://github.com/TieDyedDevil","followers_url":"https://api.github.com/users/TieDyedDevil/followers","following_url":"https://api.github.com/users/TieDyedDevil/following{/other_user}","gists_url":"https://api.github.com/users/TieDyedDevil/gists{/gist_id}","starred_url":"https://api.github.com/users/TieDyedDevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TieDyedDevil/subscriptions","organizations_url":"https://api.github.com/users/TieDyedDevil/orgs","repos_url":"https://api.github.com/users/TieDyedDevil/repos","events_url":"https://api.github.com/users/TieDyedDevil/events{/privacy}","received_events_url":"https://api.github.com/users/TieDyedDevil/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nAllow help browser to be chosen independent of $BROWSER environment variable setting. Set environment variable $fish_help_browser to the desired browser command. This variable may be an array; the entries after the first are treated as command-line options to the browser named in the first array entry.\r\nFixes issue #3131\r\n## TODOs:\r\n\r\n<!-- Just check off what what we know been done so far. We can help you with this stuff. -->\r\n- [x] Changes to fish usage are reflected in user documenation/manpages.\r\n- [ ] Tests have been added for regressions fixed\r\n\r\n…ironment variable setting. Set environment variable w3m -o confirm_qq=0 to the desired browser command. This variable may be an array; the entries after the first are treated as command-line options to the browser named in the first array entry.\r\n","created_at":"2016-10-24T01:23:50Z","updated_at":"2016-11-21T20:59:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2bf276295e97c68885299100f1ca5abd0e6ba3ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484/commits","review_comments_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484/comments","review_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3484/comments","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/1a1ada56f462821bd3c06062eba7743a33447095","head":{"label":"TieDyedDevil:master","ref":"master","sha":"1a1ada56f462821bd3c06062eba7743a33447095","user":{"login":"TieDyedDevil","id":4656502,"avatar_url":"https://avatars.githubusercontent.com/u/4656502?v=3","gravatar_id":"","url":"https://api.github.com/users/TieDyedDevil","html_url":"https://github.com/TieDyedDevil","followers_url":"https://api.github.com/users/TieDyedDevil/followers","following_url":"https://api.github.com/users/TieDyedDevil/following{/other_user}","gists_url":"https://api.github.com/users/TieDyedDevil/gists{/gist_id}","starred_url":"https://api.github.com/users/TieDyedDevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TieDyedDevil/subscriptions","organizations_url":"https://api.github.com/users/TieDyedDevil/orgs","repos_url":"https://api.github.com/users/TieDyedDevil/repos","events_url":"https://api.github.com/users/TieDyedDevil/events{/privacy}","received_events_url":"https://api.github.com/users/TieDyedDevil/received_events","type":"User","site_admin":false},"repo":{"id":71728579,"name":"fish-shell","full_name":"TieDyedDevil/fish-shell","owner":{"login":"TieDyedDevil","id":4656502,"avatar_url":"https://avatars.githubusercontent.com/u/4656502?v=3","gravatar_id":"","url":"https://api.github.com/users/TieDyedDevil","html_url":"https://github.com/TieDyedDevil","followers_url":"https://api.github.com/users/TieDyedDevil/followers","following_url":"https://api.github.com/users/TieDyedDevil/following{/other_user}","gists_url":"https://api.github.com/users/TieDyedDevil/gists{/gist_id}","starred_url":"https://api.github.com/users/TieDyedDevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TieDyedDevil/subscriptions","organizations_url":"https://api.github.com/users/TieDyedDevil/orgs","repos_url":"https://api.github.com/users/TieDyedDevil/repos","events_url":"https://api.github.com/users/TieDyedDevil/events{/privacy}","received_events_url":"https://api.github.com/users/TieDyedDevil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TieDyedDevil/fish-shell","description":"The user-friendly command line shell.","fork":true,"url":"https://api.github.com/repos/TieDyedDevil/fish-shell","forks_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/forks","keys_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/teams","hooks_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/events","assignees_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/tags","blobs_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/languages","stargazers_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/subscription","commits_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/merges","archive_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/downloads","issues_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/releases{/id}","deployments_url":"https://api.github.com/repos/TieDyedDevil/fish-shell/deployments","created_at":"2016-10-23T20:41:28Z","updated_at":"2016-10-23T20:41:31Z","pushed_at":"2016-11-03T05:46:48Z","git_url":"git://github.com/TieDyedDevil/fish-shell.git","ssh_url":"git@github.com:TieDyedDevil/fish-shell.git","clone_url":"https://github.com/TieDyedDevil/fish-shell.git","svn_url":"https://github.com/TieDyedDevil/fish-shell","homepage":"http://fishshell.com","size":33123,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"fish-shell:master","ref":"master","sha":"2bb52c65c2afc449da8b55ded82e271116bd13d8","user":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"repo":{"id":4279682,"name":"fish-shell","full_name":"fish-shell/fish-shell","owner":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fish-shell/fish-shell","description":"The user-friendly command line shell.","fork":false,"url":"https://api.github.com/repos/fish-shell/fish-shell","forks_url":"https://api.github.com/repos/fish-shell/fish-shell/forks","keys_url":"https://api.github.com/repos/fish-shell/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fish-shell/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fish-shell/fish-shell/teams","hooks_url":"https://api.github.com/repos/fish-shell/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/fish-shell/fish-shell/events","assignees_url":"https://api.github.com/repos/fish-shell/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/fish-shell/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/fish-shell/fish-shell/tags","blobs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fish-shell/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/fish-shell/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/fish-shell/fish-shell/languages","stargazers_url":"https://api.github.com/repos/fish-shell/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/fish-shell/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/fish-shell/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/fish-shell/fish-shell/subscription","commits_url":"https://api.github.com/repos/fish-shell/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/fish-shell/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/fish-shell/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/fish-shell/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fish-shell/fish-shell/merges","archive_url":"https://api.github.com/repos/fish-shell/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fish-shell/fish-shell/downloads","issues_url":"https://api.github.com/repos/fish-shell/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/fish-shell/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/fish-shell/fish-shell/releases{/id}","deployments_url":"https://api.github.com/repos/fish-shell/fish-shell/deployments","created_at":"2012-05-10T03:00:55Z","updated_at":"2016-11-21T20:05:48Z","pushed_at":"2016-11-21T05:00:39Z","git_url":"git://github.com/fish-shell/fish-shell.git","ssh_url":"git@github.com:fish-shell/fish-shell.git","clone_url":"https://github.com/fish-shell/fish-shell.git","svn_url":"https://github.com/fish-shell/fish-shell","homepage":"http://fishshell.com","size":43308,"stargazers_count":6779,"watchers_count":6779,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":643,"mirror_url":null,"open_issues_count":576,"forks":643,"open_issues":576,"watchers":6779,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484"},"html":{"href":"https://github.com/fish-shell/fish-shell/pull/3484"},"issue":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/3484"},"comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/3484/comments"},"review_comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484/comments"},"review_comment":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/3484/commits"},"statuses":{"href":"https://api.github.com/repos/fish-shell/fish-shell/statuses/1a1ada56f462821bd3c06062eba7743a33447095"}}}}
{"actor":{"display_login":"krader1961"}}