diff options
author | Clint Adams <clint@users.sourceforge.net> | 2002-02-07 07:37:47 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2002-02-07 07:37:47 +0000 |
commit | e8b50bdf0f8871359cd97c503604a9a2ed588e1d (patch) | |
tree | a48470e37edcd0e15f14f39f8c24a76c08f7c0bd /Functions | |
parent | 882ca7eb767e0a8aa84bb5a69f092111c8ffd6f9 (diff) | |
download | zsh-e8b50bdf0f8871359cd97c503604a9a2ed588e1d.tar.gz zsh-e8b50bdf0f8871359cd97c503604a9a2ed588e1d.tar.xz zsh-e8b50bdf0f8871359cd97c503604a9a2ed588e1d.zip |
unposted: Colin Walters's prompt, adapted for the theme system.
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/Prompts/prompt_walters_setup | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Functions/Prompts/prompt_walters_setup b/Functions/Prompts/prompt_walters_setup new file mode 100644 index 000000000..a0777f1bb --- /dev/null +++ b/Functions/Prompts/prompt_walters_setup @@ -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 "$@" |