zsh: Use $+commands[] instead of command -v
This commit is contained in:
@@ -102,7 +102,7 @@ fi
|
||||
|
||||
# Automatically start X on login after boot.
|
||||
# Do not use exec so that the zlogout is still read.
|
||||
if command -v startx &>/dev/null && [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
if (( $+commands[startx] )) && [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
startx
|
||||
exit $?
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user