Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Add missing local -a match in promptinit



Got a surprising result when trying to help daniel on irc,
% echo ${path/\/*\/(*)\/*/$match[1]}
zefram zefram /opt/bin zefram /usr/bin /bin zefram /usr/sbin /sbin zefram zefram zefram zefram zefram

---
 Functions/Prompts/promptinit |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Functions/Prompts/promptinit b/Functions/Prompts/promptinit
index 66e73a7..c29b76c 100644
--- a/Functions/Prompts/promptinit
+++ b/Functions/Prompts/promptinit
@@ -15,6 +15,7 @@ promptinit () {
   emulate -L zsh
   setopt extendedglob
   local ppath='' name theme
+  local -a match
 
   # Autoload all prompt_*_setup functions in fpath
   for theme in $^fpath/prompt_*_setup(N); do
-- 
1.7.10.GIT



Messages sorted by: Reverse Date, Date, Thread, Author