From 51cb3f0a27ea185be2d703be822b2b4b23eba0b7 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 3 Nov 1999 09:06:17 +0000 Subject: zsh-3.1.6-bart-8 --- Functions/Prompts/promptinit | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'Functions/Prompts/promptinit') diff --git a/Functions/Prompts/promptinit b/Functions/Prompts/promptinit index 285b9e4d9..c249412cf 100644 --- a/Functions/Prompts/promptinit +++ b/Functions/Prompts/promptinit @@ -106,21 +106,12 @@ Options: } prompt () { - local -A prompt_opts - local opt - + local prompt_opts + set_prompt "$@" - - # Set prompt options - for opt in ${(k)prompt_opts}; do - if [[ $prompt_opts[$opt] != (|un)set ]]; then - echo "${0##*/}: value of prompt option must be 'set' or 'unset'" >&2 - return 1 - else - $prompt_opts[$opt]opt prompt$opt - fi - done + + (( $#prompt_opts )) && + setopt noprompt{bang,cr,percent,subst} prompt${^prompt_opts[@]} } promptinit "$@" - -- cgit 1.4.1