mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
__fish_print_commands: remove code clone
Also, use it for help completions also on embed-data builds.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
if test -d "$__fish_data_dir/man/man1/"
|
||||
complete -c help -x -a '(__fish_print_commands)' -d 'Help for this command'
|
||||
end
|
||||
complete -c help -x -a '(__fish_print_commands)' -d 'Help for this command'
|
||||
|
||||
# Help topics in index.html
|
||||
# This was semi-automated with `grep 'class="anchor"' -A1 /usr/share/doc/fish/index.html
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
# localization: skip(private)
|
||||
function __fish_print_commands --description "Print a list of documented fish commands"
|
||||
if set -q __fish_data_dir[1] && test -d $__fish_data_dir/man/man1/
|
||||
for file in $__fish_data_dir/man/man1/**.1*
|
||||
string replace -r '.*/' '' -- $file |
|
||||
string replace -r '.1(.gz)?$' '' |
|
||||
string match -rv '^fish-(?:changelog|completions|doc|tutorial|faq|for-bash-users|interactive|language|releasenotes|terminal-compatibility)$'
|
||||
end
|
||||
end
|
||||
status list-files man/man1/ 2>/dev/null |
|
||||
printf %s\n $__fish_data_dir/man/man1/**.1*
|
||||
else
|
||||
status list-files man/man1/ 2>/dev/null
|
||||
end |
|
||||
string replace -r '.*/' '' |
|
||||
string replace -r '.1(.gz)?$' '' |
|
||||
string match -rv '^fish-(?:changelog|completions|doc|tutorial|faq|for-bash-users|interactive|language|releasenotes)$'
|
||||
string match -rv '^fish-(?:changelog|completions|doc|tutorial|faq|for-bash-users|interactive|language|releasenotes|terminal-compatibility)$'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user