diff --git a/share/completions/and.fish b/share/completions/and.fish index 1133aa012..eafcb3a16 100644 --- a/share/completions/and.fish +++ b/share/completions/and.fish @@ -1,3 +1,3 @@ - complete -c and -s h -l help --description 'Display help and exit' -complete -c and -xa '__fish_complete_subcommand' +complete -c and -xa '( __fish_complete_subcommand )' + diff --git a/share/completions/or.fish b/share/completions/or.fish index fb3f0b611..9982a94ea 100644 --- a/share/completions/or.fish +++ b/share/completions/or.fish @@ -1,3 +1,3 @@ complete -c or -s h -l help --description 'Display help and exit' -complete -c or -xa '__fish_complete_subcommand' +complete -c or -xa '(__fish_complete_subcommand)' diff --git a/share/completions/watch.fish b/share/completions/watch.fish new file mode 100644 index 000000000..58445ea54 --- /dev/null +++ b/share/completions/watch.fish @@ -0,0 +1,14 @@ +complete -c watch -s b -l beep -d 'Beep if command has a non-zero exit' +complete -c watch -s c -l color -d 'Interpret ANSI color sequences' +complete -c watch -s d -l differences -d 'Highlight changes between updates' +complete -c watch -s d -l differences=permanent -d 'Highlight changes between updates' +complete -c watch -s e -l errexit -d 'Exit if command has a non-zero exit' +complete -c watch -s g -l chgexit -d 'Exit when output from command changes' +complete -c watch -s n -l interval -d 'Seconds to wait between updates' -x +complete -c watch -s p -l precise -d 'Attempt run command in precise intervals' +complete -c watch -s t -l no-title -d 'Turn off header' +complete -c watch -s x -l exec -d 'Pass command to exec instead of "sh -c"' +complete -c watch -s h -l help -d 'Display this help and exit' +complete -c watch -s v -l version -d 'Output version information and exit' +complete -c watch -xa '(__fish_complete_subcommand -- -n --interval)' + diff --git a/share/functions/__fish_describe_command.fish b/share/functions/__fish_describe_command.fish index 27f3af3bd..76971e739 100644 --- a/share/functions/__fish_describe_command.fish +++ b/share/functions/__fish_describe_command.fish @@ -3,7 +3,7 @@ # function __fish_describe_command -d "Command used to find descriptions for commands" - apropos $argv | awk -v FS=" +- +" '{ + apropos $argv ^/dev/null | awk -v FS=" +- +" '{ split($1, names, ", "); for (name in names) if (names[name] ~ /^'"$argv"'.* *\([18]\)/ ) {