Three more of the same test -z thing.

This commit is contained in:
Aaron Gyes 2022-08-02 00:42:09 -07:00
parent b9590d04e7
commit ff2999ef2b
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Helper function for completions that need to enumerate block devices.
function __fish_complete_blockdevice
set -l cmd (commandline -ct)
test "" = "$cmd"
test -z "$cmd"
and set cmd /dev/
for f in $cmd*
test -b $f

View File

@ -64,7 +64,7 @@ function cdh --description "Menu based cd command"
# Ask the user which directory from their history they want to cd to.
set -l msg (_ 'Select directory by letter or number: ')
read -l -p "echo '$msg'" choice
if test "$choice" = ""
if test -z "$choice"
return 0
else if string match -q -r '^[a-z]$' $choice
# Convert the letter to an index number.

View File

@ -48,7 +48,7 @@ function help --description 'Show help for the fish shell'
# If we are in a graphical environment, check if there is a graphical
# browser to use instead.
if test -n "$DISPLAY" -a \( "$XAUTHORITY" = "$HOME/.Xauthority" -o "$XAUTHORITY" = "" \)
if test -n "$DISPLAY" -a \( "$XAUTHORITY" = "$HOME/.Xauthority" -o -z "$XAUTHORITY"\)
for i in $graphical_browsers
if type -q -f $i
set fish_browser $i