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

rake completion with colons in their names


I've observed rake completion does not work fully with nested rake
tasks (having a namespace and being in the form "namespace:task").

This has already been reported in
zsh-workers 22600: http://www.zsh.org/mla/workers/2006/msg00475.html
and Debian #379942: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379942

The generation part was fixed, but not the matching part.

Nikolai Weibull says "Adding 'r:|[:]=*' to ones matcher-list makes it
work, but should this really be necessary?".

Indeed, adding that to the matcher-list works for me, but I guess it's
not ideal to modify that global list.

I found a workaround in the zshcompsys manual at tag-order:
"Another use of patterns is to try multiple match specifications one
after another.  The matcher-list style offers something similar, but
it is tested very early in the completion system and hence can't be
set for single commands nor for more specific contexts."

  zstyle ':completion:*:*:rake:*' tag-order '*' '*:-colon'
  zstyle ':completion:*-colon' matcher 'r:|[:]=*'

Could someone confirm this is appropriate?

And if so, could it be added to zsh (or be documented)?

Benoit Daloze

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