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

Re: 4.0.1: menucomplete quirk leaving extra characters behind

Bart Schaefer wrote:
> > (Btw, on Solaris the characters are ``!='' instead.)
> I keep on hitting TAB I see #= and $= and *=.  This is actually a bug, I
> guess, because those parameters are read-only and so you shouldn't be able
> to complete them on the left side of an assignment, but menucompletion is

Yes, it is arguably a bug, though not hard to fix. This will still offer
@= and *= because they are not readonly but you can't assign to them
this way. I'll commit this to the stable branch later unless anyone

> Ah; you (may) want
>       zstyle ':completion:*' insert-tab true

I use this:
zstyle -e ':completion:*:*:-command-:*' tag-order '
    [[ -n $PREFIX$SUFFIX || $1 = messages ]] || 
        { reply=( - ); _message "not with an empty word" }'

which has the advantage of working in other places where commands are
completed such as after noglob. It depends on why you don't want
completion at that position - I don't because it tends to be slow with
several thousand commands.


Index: Completion/Zsh/Type/_command_names
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Type/_command_names,v
retrieving revision 1.1
diff -u -r1.1 _command_names
--- Completion/Zsh/Type/_command_names  2001/04/02 11:17:31     1.1
+++ Completion/Zsh/Type/_command_names  2001/06/13 10:28:19
@@ -22,7 +22,7 @@
     'aliases:alias:compadd -k aliases'
     'reserved-words:reserved word:compadd -k reswords'
     'jobs:: _jobs -t'
-    'parameters:: _parameters -qS= -r "\n\t\- =["'
+    'parameters:: _parameters -g "^*readonly*" -qS= -r "\n\t\- =["'

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