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

Re: Wish for rprompt feature



On Mar 20, 11:28am, Wayne Davison wrote:
} Subject: Re: Wish for rprompt feature
}
} If I use "prompt bart", the spacing prior to the date is missing and I
} get this error:
} 
} prompt_bart_precmd:14: : parameter not set
} 
} I added "unset" to the "setopt localoptions" in prompt_bart_precmd and
} the error went away.  Is that the right fix?

Yes, that is the right fix.  I have it in my copy here at home, but I
apparently never remembered to commit it. :-(

Index: Functions/Prompts/prompt_bart_setup
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Prompts/prompt_bart_setup,v
retrieving revision 1.6
diff -u -r1.6 prompt_bart_setup
--- Functions/Prompts/prompt_bart_setup 11 Apr 2001 22:25:27 -0000      1.6
+++ Functions/Prompts/prompt_bart_setup 20 Mar 2004 23:49:03 -0000
@@ -58,7 +58,7 @@
 }
 
 prompt_bart_precmd () {
-    setopt localoptions noxtrace noksharrays
+    setopt localoptions noxtrace noksharrays unset
     local zero='%([BSUbsu]|{*%})'
 
     # Using psvar here protects against unwanted promptsubst expansions.
@@ -111,7 +111,7 @@
 }
 
 prompt_bart_winch () {
-    setopt localoptions noksharrays
+    setopt localoptions noksharrays unset
 
     # Delete ourself from TRAPWINCH if not using our precmd insert.
     [[ $functions[precmd] = *prompt_bart_precmd* ]] && prompt_bart_ps1 ||
@@ -119,7 +119,7 @@
 }
 
 prompt_bart_setup () {
-    setopt localoptions noksharrays
+    setopt localoptions noksharrays unset
 
     # A few extra niceties ...
     repeat 1 case "$1:l" in



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