mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
Three more of the same test -z thing.
This commit is contained in:
parent
b9590d04e7
commit
ff2999ef2b
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user