etc/conf/zfuncs/prompt_gebner_setup

33 lines
557 B
Plaintext
Raw Normal View History

#!/bin/zsh
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: "