about summary refs log tree commit diff
path: root/Functions/Prompts
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-03 09:06:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-03 09:06:17 +0000
commit51cb3f0a27ea185be2d703be822b2b4b23eba0b7 (patch)
tree5db1bf8f6c42192fcf99306695b4e9ce715322d6 /Functions/Prompts
parent5a78f7af98401d4974b52b844994e4d783592b16 (diff)
downloadzsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.tar.gz
zsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.tar.xz
zsh-51cb3f0a27ea185be2d703be822b2b4b23eba0b7.zip
zsh-3.1.6-bart-8 zsh-3.1.6-bart-8
Diffstat (limited to 'Functions/Prompts')
-rw-r--r--Functions/Prompts/.distfiles2
-rw-r--r--Functions/Prompts/promptinit19
2 files changed, 6 insertions, 15 deletions
diff --git a/Functions/Prompts/.distfiles b/Functions/Prompts/.distfiles
index 81b4f2c07..2c8ff8497 100644
--- a/Functions/Prompts/.distfiles
+++ b/Functions/Prompts/.distfiles
@@ -5,5 +5,5 @@ DISTFILES_SRC='
     prompt_fire_setup prompt_suse_setup prompt_blue_setup
     prompt_green_setup prompt_white_setup prompt_combo_setup
     prompt_magenta_setup prompt_yellow_setup prompt_cyan_setup
-    prompt_off_setup promptinit
+    prompt_oliver_setup prompt_off_setup 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 "$@"
-