1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00
zsh/Functions/Prompts/prompt_walters_setup
2015-11-27 07:27:23 +00:00

26 lines
537 B
Text

prompt_walters_help () {
cat <<'EOF'
This prompt is color-scheme-able. You can invoke it thus:
prompt walters [<color1>]
where the color is for the right-hand prompt.
This prompt was stolen from Colin Walters <walters@debian.org>,
who gives credit to Michel Daenzer <daenzer@debian.org>.
EOF
}
prompt_walters_setup () {
if [[ "$TERM" != "dumb" ]]; then
PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
RPROMPT="%F{${1:-green}}%~%f"
else
PROMPT="%(?..[%?] )%n@%m:%~> "
fi
prompt_opts=(cr percent)
}
prompt_walters_setup "$@"