X-Git-Url: https://git.siccegge.de//index.cgi?p=dotfiles%2Fzsh.git;a=blobdiff_plain;f=zshrc;h=1f54e35a8d3c8321eef7361c5f88e4cc962e9f0d;hp=64ad4eaceb21954fb67ff78829269572a6b7812f;hb=5b0e551b5a3584618e06bfde769878b4b6944835;hpb=7ae684b2c49b2696455aaf09cde67896c95f9642 diff --git a/zshrc b/zshrc index 64ad4ea..1f54e35 100644 --- a/zshrc +++ b/zshrc @@ -65,7 +65,7 @@ precmd () { 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' ' '`" @@ -93,7 +93,7 @@ case "${DOMAIN//cs.fau.de/informatik.uni-erlangen.de}" in ;; esac -if [[ $UID == 0 && -f `which systemctl` ]] +if [[ $UID == 0 && $+commands[systemctl] != 0 ]] then PROMPT=$'%{$fg[red]>> $systemd_failed$reset_color%}\n' else