fish-shell/share/completions/test.fish

39 lines
2.2 KiB
Fish
Raw Normal View History

complete -c test -l help --description "Display help and exit"
#complete -c test -l version --description "Display version and exit"
complete -c test -a ! --description "Negate expression"
complete -c test -s a --description "Logical AND"
complete -c test -s o --description "Logical OR"
complete -c test -s n --description "String length is non-zero"
complete -c test -s z --description "String length is zero"
complete -c test -a = --description "Strings are equal"
complete -c test -a != --description "Strings are not equal"
complete -c test -o eq --description "Integers are equal"
complete -c test -o ge --description "Left integer larger than or equal to right integer"
complete -c test -o gt --description "Left integer larger than right integer"
complete -c test -o le --description "Left integer less than or equal to right integer"
complete -c test -o lt --description "Left integer less than right integer"
complete -c test -o ne --description "Left integer not equal to right integer"
# builtin test does not do these
#complete -c test -o ef --description "Left file equal to right file"
#complete -c test -o nt --description "Left file newer than right file"
#complete -c test -o ot --description "Left file older than right file"
complete -c test -s b --description "File is block device"
complete -c test -s c --description "File is character device"
complete -c test -s d --description "File is directory"
complete -c test -s e --description "File exists"
complete -c test -s f --description "File is regular"
complete -c test -s g --description "File is set-group-ID"
complete -c test -s G --description "File owned by our effective group ID"
complete -c test -s L --description "File is a symlink"
complete -c test -s O --description "File owned by our effective user ID"
complete -c test -s p --description "File is a named pipe"
complete -c test -s r --description "File is readable"
complete -c test -s s --description "File size is non-zero"
complete -c test -s S --description "File is a socket"
complete -c test -s t --description "FD is a terminal"
complete -c test -s u --description "File set-user-ID bit is set"
complete -c test -s w --description "File is writable"
complete -c test -s x --description "File is executable"