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

problems completing reserved words



completing after disable -r results in:
  (eval):1: parse error near `}'

Is it perhaps new that `}' and `{' can be disabled because _disable and
_enable haven't been updated in a long time so they may have once
worked. This could also have been caused by a change in _arguments. Or
maybe they never worked.

Anyway the two functions can be directly fixed with this patch.

Oliver

Index: Completion/Zsh/Command/_disable
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Command/_disable,v
retrieving revision 1.1
diff -u -r1.1 _disable
--- Completion/Zsh/Command/_disable	2 Apr 2001 11:27:24 -0000	1.1
+++ Completion/Zsh/Command/_disable	18 Jun 2004 12:44:09 -0000
@@ -3,6 +3,6 @@
 _arguments -C -s -A "-*" -S \
   "(-f -r)-a[act on aliases]:*:aliases:(${(k)aliases} ${(k)galiases})" \
   "(-a -r)-f[act on functions]:*:functions:(${(k)functions})" \
-  "(-a -f)-r[act on reserved words]:*:reserved-words:(${(k)reswords})" \
+  "(-a -f)-r[act on reserved words]:*:reserved-words:compadd -k reswords" \
   '-m[treat arguments as patterns]' \
   "*:builtin command:(${(k)builtins})"
Index: Completion/Zsh/Command/_enable
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Command/_enable,v
retrieving revision 1.2
diff -u -r1.2 _enable
--- Completion/Zsh/Command/_enable	7 Aug 2001 19:29:14 -0000	1.2
+++ Completion/Zsh/Command/_enable	18 Jun 2004 12:44:09 -0000
@@ -3,6 +3,6 @@
 _arguments -C -s -A "-*" -S \
   "(-f -r)-a[act on aliases]:*:aliases:(${(k)dis_aliases})" \
   "(-a -r)-f[act on functions]:*:functions:(${(k)dis_functions})" \
-  "(-a -f)-r[act on reserved words]:*:reserved-words:(${(k)dis_reswords})" \
+  "(-a -f)-r[act on reserved words]:*:reserved-words:compadd -k dis_reswords" \
   '-m[treat arguments as patterns]' \
   "*:builtin command:(${(k)dis_builtins})"



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