]> git.donarmstrong.com Git - zsh.git/commitdiff
add debian_chroot to prompt
authormartin f. krafft <madduck@madduck.net>
Fri, 9 May 2008 10:53:51 +0000 (11:53 +0100)
committermartin f. krafft <madduck@madduck.net>
Fri, 9 May 2008 10:53:51 +0000 (11:53 +0100)
.zsh/zshrc/80_prompt

index 41763acd6ec180ffc8e86bf56b137861988cc207..95ea67d64dfc7378a45ec6227929a70537e47532 100644 (file)
@@ -14,7 +14,13 @@ if is_root; then
   _MIDDLE="%25<..<%~%<<"
   _PS1_HL=U
 fi
-PS1="%(2L.+.)%${_PS1_HL:=B}%m%${(L)_PS1_HL}:${_MIDDLE}%# "
+
+_MACHINE_NAME="${_PS1_HL:=B}%m%${(L)_PS1_HL}"
+_MACHINE_NAME="$_MACHINE_NAME${debian_chroot:+/$debian_chroot}"
+
+PS1="%(2L.+.)%${_MACHINE_NAME}:${_MIDDLE}%# "
 RPS1="#%(0?..%?,)%!"
 
+unset _MACHINE_NAME
+
 # vim:ft=zsh