mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Get rid of 'nothing appropriate' output when completing.
Add watch completion.
This commit is contained in:
parent
13b1b73c15
commit
1070b34996
4 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,3 @@
|
||||||
|
|
||||||
complete -c and -s h -l help --description 'Display help and exit'
|
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 )'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
|
|
||||||
complete -c or -s h -l help --description 'Display help and exit'
|
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)'
|
||||||
|
|
14
share/completions/watch.fish
Normal file
14
share/completions/watch.fish
Normal file
|
@ -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)'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function __fish_describe_command -d "Command used to find descriptions for commands"
|
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, ", ");
|
split($1, names, ", ");
|
||||||
for (name in names)
|
for (name in names)
|
||||||
if (names[name] ~ /^'"$argv"'.* *\([18]\)/ ) {
|
if (names[name] ~ /^'"$argv"'.* *\([18]\)/ ) {
|
||||||
|
|
Loading…
Reference in a new issue