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

Re: PATCH: _read_comp widget broken by 'setopt nounset'



Greg Klanderman wrote:
> 
> Hi, I submitted this back in February, but it has not been applied or
> commented on.  Could someone take a look please?

It's certainly harmless; we should also get around warncreateglobal
warnings, too.

Index: Completion/Base/Widget/_read_comp
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Widget/_read_comp,v
retrieving revision 1.1
diff -u -r1.1 _read_comp
--- Completion/Base/Widget/_read_comp	2 Apr 2001 11:17:07 -0000	1.1
+++ Completion/Base/Widget/_read_comp	21 Apr 2009 16:00:44 -0000
@@ -23,9 +23,10 @@
 #  _read_comp         Last completion string read from user
 
 # emulate -L zsh
-setopt localoptions extendedglob nobadpattern # xtrace promptsubst
+setopt localoptions extendedglob nobadpattern unset # xtrace promptsubst
 # local PS4='%N:%i:$((#key))> '
 
+typeset -g _read_comp
 if [[ ${+NUMERIC} = 0 && -n $_read_comp ]]; then
   if [[ $_read_comp = _* ]]; then
     eval $_read_comp


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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