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