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

Re: completion oddity



On May 21, 10:01pm, Danek Duvall wrote:
}
} I did a quick test with the matcher-list zstyle, though, but couldn't
} get it to work (without the -M "" in _k).

Two things ...

}     zstyle ":completion::complete:k::" matcher-list ""

(1) The matcher-list is looked up very early in completion.  The context
isn't yet this specific at that point.  (I think this is in the FAQ.)

}     zstyle ":completion:*" matcher-list ""

The matcher-list style is only used when it is not empty!

_description: [[ -n "$_matcher" ]] && opts=($opts -M "$_matcher")

So you can't use matcher-list to turn off matching, only to modify it.

} I also took another look through the GNU tar options for a similar
} situation, and found

Hmm, when I try gtar completion I get

_arguments:comparguments:312: invalid option definition: -[0-7]lmh[specify drive and density]

So I'm not really able to reproduce this.

}     gtar --show--names<TAB>
} 
} and it beeps and moves me to between the second double-hyphen, then after
} another beep, starts cycling between the two.  If I just have "--show"
} there, then it ends up cycling among four alternatives.

Do all four alternatives have the same number of hyphens?



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