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

Re: disable substring match on command name



On Mar 8,  9:37pm, Bart Schaefer wrote:
}
}     zstyle -e '(#b)(:completion:*)' matcher-list \
}         'zstyle -a "word-$CURRENT$match" matcher-list reply'

Turns out there are two other minor gotchas with this:

(1) The pattern is compiled at the time the style is defined, so you
    must have extendedglob set for this to work; it's not sufficient
    that compsys has it set at the time of lookup.

(2) However, the zstyles are stored by the literal pattern string,
    so if you accidentally define one like this with extendedglob
    NOT set, you have to explicitly delete it with 'zstyle -d' and
    then re-create it; it does not work to simply execute exactly
    the same zstyle command again after toggling extendedglob.

I'm surprised the latter hasn't mysteriously bitten someone else in
a different situation, but I guess zstyles aren't something that one
frobs at the command line very often.



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