vcs_info
setWindowTitle ${USER}@${HOST}
- if [[ $UID == 0 && -f `which systemctl` ]]
+ if [[ $UID == 0 && $+commands[systemctl] != 0 ]]
then
use_systemd=true
systemd_failed="`systemctl --state=failed | grep failed | cut -d \ -f 2 | tr '\n' ' '`"
;;
esac
-if [[ $UID == 0 && -f `which systemctl` ]]
+if [[ $UID == 0 && $+commands[systemctl] != 0 ]]
then
PROMPT=$'%{$fg[red]>> $systemd_failed$reset_color%}\n'
else