mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 02:13:38 +08:00
c1af29f641
We want to show our completions for the `[` (`test`) builtin, but we don't want to create a [.fish.
35 lines
1.7 KiB
Fish
35 lines
1.7 KiB
Fish
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 identical"
|
|
complete -c test -f -a != -d "Strings are not identical"
|
|
complete -c test -f -o eq -d "Numbers are equal"
|
|
complete -c test -f -o ge -d "Left number >= right number"
|
|
complete -c test -f -o gt -d "Left number > right number"
|
|
complete -c test -f -o le -d "Left number <= right number"
|
|
complete -c test -f -o lt -d "Left number < right number"
|
|
complete -c test -f -o ne -d "Left number != right number"
|
|
# 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"
|
|
#complete -c test -o ot -d "Left file older than right file"
|
|
complete -c test -s b -d "File is block device"
|
|
complete -c test -s c -d "File is character device"
|
|
complete -c test -s d -d "File is directory"
|
|
complete -c test -s e -d "File exists"
|
|
complete -c test -s f -d "File is regular"
|
|
complete -c test -s g -d "File is set-group-ID"
|
|
complete -c test -s G -d "File owned by our effective group ID"
|
|
complete -c test -s L -d "File is a symlink"
|
|
complete -c test -s O -d "File owned by our effective user ID"
|
|
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 -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"
|