help: Use variable-as-command instead of eval

This commit is contained in:
Fabian Homborg
2018-10-21 15:33:29 +02:00
parent fc51c156cb
commit e9568069a7

View File

@@ -165,14 +165,14 @@ function help --description 'Show help for the fish shell'
case '*'
printf (_ 'help: Help is being displayed in %s.\n') $fish_browser[1]
end
eval "$fish_browser $page_url &"
$fish_browser $page_url &
else
# Work around lynx bug where <div class="contents"> always has the same formatting as links (unreadable)
# by using a custom style sheet. See https://github.com/fish-shell/fish-shell/issues/4170
set -l local_file 0
if eval $fish_browser --version 2>/dev/null | string match -qr Lynx
if $fish_browser --version 2>/dev/null | string match -qr Lynx
set fish_browser $fish_browser -lss={$__fish_data_dir}/lynx.lss
end
eval $fish_browser $page_url
$fish_browser $page_url
end
end