From 8d0e1f3bccb89a35906788ee128f711b75354009 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sun, 25 Nov 2018 00:08:59 -0800 Subject: [PATCH] test completions: don't complete files for string tests, wrap [ also removed --help - test doesn't do that. --- share/completions/test.fish | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/share/completions/test.fish b/share/completions/test.fish index 96b812ed2..a09e9c2db 100644 --- a/share/completions/test.fish +++ b/share/completions/test.fish @@ -1,19 +1,19 @@ - -complete -c test -l help -d "Display help and exit" +complete -c [ --wraps test +#complete -c test -l help -d "Display help and exit" #complete -c test -l version -d "Display version and exit" -complete -c test -a ! -d "Negate expression" -complete -c test -s a -d "Logical AND" -complete -c test -s o -d "Logical OR" -complete -c test -s n -d "String length is non-zero" -complete -c test -s z -d "String length is zero" -complete -c test -a = -d "Strings are equal" -complete -c test -a != -d "Strings are not equal" -complete -c test -o eq -d "Integers are equal" -complete -c test -o ge -d "Left integer larger than or equal to right integer" -complete -c test -o gt -d "Left integer larger than right integer" -complete -c test -o le -d "Left integer less than or equal to right integer" -complete -c test -o lt -d "Left integer less than right integer" -complete -c test -o ne -d "Left integer not equal to right integer" +complete -c test -f -a ! -d "Negate expression" +complete -c test -f -s a -d "Logical AND" +complete -c test -f -s o -d "Logical OR" +complete -c test -f -s n -d "String length is non-zero" +complete -c test -f -s z -d "String length is zero" +complete -c test -f -a = -d "Strings are equal" +complete -c test -f -a != -d "Strings are not equal" +complete -c test -f -o eq -d "Integers are equal" +complete -c test -f -o ge -d "Left integer larger than or equal to right integer" +complete -c test -f -o gt -d "Left integer larger than right integer" +complete -c test -f -o le -d "Left integer less than or equal to right integer" +complete -c test -f -o lt -d "Left integer less than right integer" +complete -c test -f -o ne -d "Left integer not equal to right integer" # builtin test does not do these #complete -c test -o ef -d "Left file equal to right file" #complete -c test -o nt -d "Left file newer than right file" @@ -31,7 +31,7 @@ complete -c test -s p -d "File is a named pipe" complete -c test -s r -d "File is readable" complete -c test -s s -d "File size is non-zero" complete -c test -s S -d "File is a socket" -complete -c test -s t -d "FD is a terminal" +complete -c test -f -s t -d "FD is a terminal" complete -c test -s u -d "File set-user-ID bit is set" complete -c test -s w -d "File is writable" complete -c test -s x -d "File is executable"