etc/zfuncs/prompt_gebner_setup
2011-07-28 22:05:16 +02:00

34 lines
581 B
Bash

#!/bin/zsh
autoload colors; colors
local host_color user_color user_sym user_prompt host_prompt
case "$HOST" in
schnecke1) host_color=blue ;;
schnecke2) host_color=green ;;
achatina) host_color=red ;;
*) host_color=yellow ;;
esac
case "$USER" in
gebner)
user_color=green
user_sym=\$
;;
root)
user_color=red
user_sym=\#
;;
*)
user_color=yellow
user_sym=\%
esac
user_prompt="%{$fg[$user_color]%}$USER%{$reset_color%}"
host_prompt="%{$fg[$host_color]%}$HOST%{$reset_color%}"
PS1="$user_prompt@$host_prompt %~ [%?] $user_sym "
PS2="%_ ... "
PS3="? "
PS4="%N:%i: "