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

Re: tag-order problem?



Tanaka Akira wrote:

> I found a problem as follows.
> 
> Z(2):akr@flux% Src/zsh -f
> flux% echo $ZSH_VERSION 
> 4.0.1-pre-5
> flux% bindkey -e; fpath=(Completion Completion/**/*(/)); autoload -U compinit; compinit -D
> flux% zstyle '*' group-name ''
> flux% zstyle '*:messages' format '%d'
> flux% zstyle '*:descriptions' format '%d'
> flux% zstyle ':completion:*' 'tag-order' '*:-non-cvs' '*'
> flux% zstyle ':completion:*-non-cvs' 'ignored-patterns' '(*/|)CVS'
> flux% compdef _tst tst
> flux% _tst () { _arguments -s '-a-:x:' '-b' }
> flux% tst -a<TAB>
> x
> option
> -b
> 
> I think the option `-b' shouldn't completed here.

I know this isn't nice, but I didn't see a good solution and still don't
see one.  This is `caused' by the default value for tag-order which
makes arguments and value be preferred over options (as mentioned in the
docs for the tag-order style).

What one would want here is that the completion system magically knows
that `*' is intended to give the `normal' behaviour.  Unless in those
cases where one really wants to have all tags used at the same time. And
that's the problem...

Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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