From e8b50bdf0f8871359cd97c503604a9a2ed588e1d Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Thu, 7 Feb 2002 07:37:47 +0000 Subject: unposted: Colin Walters's prompt, adapted for the theme system. --- Functions/Prompts/prompt_walters_setup | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Functions/Prompts/prompt_walters_setup (limited to 'Functions') 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 [] + +where the color is for the right-hand prompt. + +This prompt was stolen from Colin Walters , +who gives credit to Michel Daenzer . +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 "$@" -- cgit 1.4.1