mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Fix help completion to not barf if html file is absent
This commit is contained in:
parent
425afa63ce
commit
5ea486b20a
1 changed files with 4 additions and 2 deletions
|
@ -2,9 +2,11 @@
|
||||||
# Completions for the help command
|
# Completions for the help command
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if test -f "$__fish_help_dir/commands.html"
|
||||||
for i in case (sed -n < $__fish_help_dir/commands.html -e "s/.*<h2><a class=\"anchor\" name=\"\([^\"]*\)\">.*/\1/p")
|
for i in case (sed -n < $__fish_help_dir/commands.html -e "s/.*<h2><a class=\"anchor\" name=\"\([^\"]*\)\">.*/\1/p")
|
||||||
complete -c help -x -a $i --description "Help for the specified command"
|
complete -c help -x -a $i --description "Help for the specified command"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
complete -c help -x -a syntax --description 'Introduction to the fish syntax'
|
complete -c help -x -a syntax --description 'Introduction to the fish syntax'
|
||||||
complete -c help -x -a todo --description 'Incomplete aspects of fish'
|
complete -c help -x -a todo --description 'Incomplete aspects of fish'
|
||||||
|
|
Loading…
Reference in a new issue