zshrc: New prompt: Enable one of the prompts
[grml-etc-core.git] / etc / zsh / zshrc
index 48d0766..b4ec1b7 100644 (file)
@@ -1540,6 +1540,8 @@ if zrcautoload promptinit && promptinit 2>/dev/null ; then
         add-zsh-hook precmd battery
     fi
     if [[ "$TERM" == dumb ]] ; then
+        zstyle ":prompt:grml(|-large|-chroot):*:items:grml-chroot" pre ''
+        zstyle ":prompt:grml(|-large|-chroot):*:items:grml-chroot" post ' '
         for i in rc user path jobs history date time shell-level; do
             zstyle ":prompt:grml(|-large|-chroot):*:items:$i" pre ''
             zstyle ":prompt:grml(|-large|-chroot):*:items:$i" post ''
@@ -1550,7 +1552,14 @@ if zrcautoload promptinit && promptinit 2>/dev/null ; then
         zstyle ':prompt:grml(|-large|-chroot):*:items:user' pre '%F{red}'
     fi
 
-    prompt grml
+    # Finally enable one of the prompts.
+    if [[ -n $GRML_CHROOT ]]; then
+        prompt grml-chroot
+    elif [[ $GRMLPROMPT -gt 0 ]]; then
+        prompt grml-large
+    else
+        prompt grml
+    fi
 else
     print 'Notice: no promptinit available :('
 fi