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

Re: _call_program (and possibly other hooks) or opt_args quoting prob lem.



On May 16,  8:32pm, Borsenkow Andrej wrote:
}
} _call_program evals its argument(s). It creates very interesting problem -
} we want to quote word separator _but_ we do not want to quote possible
} parameter expansions ...

What about this?

Index: Completion/Base/Utility/_call_program
===================================================================
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 _call_program
--- Completion/Base/Utility/_call_program	2001/04/09 20:14:08	1.1.1.1
+++ Completion/Base/Utility/_call_program	2002/05/17 18:38:04
@@ -4,7 +4,7 @@
 
 if zstyle -s ":completion:${curcontext}:${1}" command tmp; then
   if [[ "$tmp" = -* ]]; then
-    eval "$tmp[2,-1]" "$argv[2,-1]"
+    eval "$tmp[2,-1]" "${(qqq)argv[2,-1]}"
   else
     eval "$tmp"
   fi



-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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