mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
unposted: Colin Walters's prompt, adapted for the theme system.
This commit is contained in:
parent
882ca7eb76
commit
e8b50bdf0f
1 changed files with 25 additions and 0 deletions
25
Functions/Prompts/prompt_walters_setup
Normal file
25
Functions/Prompts/prompt_walters_setup
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
export PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
|
||||
export RPROMPT="%{$fg_no_bold[${1:-green}]%}%~%{$reset_color%}"
|
||||
else
|
||||
export PROMPT="%(?..[%?] )%n@%m:%~> "
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
prompt_walters_setup "$@"
|
Loading…
Add table
Add a link
Reference in a new issue