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

Re: Completion lists



Yuri DElia <wavexx <at> users.sf.net> writes:

> c='${PREFIX:+=(#b)($PREFIX:t)(?)*===$color[bold]}':'=(#b)(?)*==$color[bold]'
> zstyle -e ':completion:*' list-colors "reply=(\"$c\")"

I think I've hit a zsh bug here :/.

c='${PREFIX:+=(#b)${PREFIX:t}(?)*==1}':'=(#b)(?)*==1'
zstyle -e ':completion:*' list-colors "reply=(\"$c\")"

Try to complete a directory such as "./" first. The second expression will 
match, and the first character becomes bold.

Now try:

$ touch fileaa
$ touch filebb
$ ls file<TAB>

(this will correctly highlight "a" and "b")

suddenly:

$ ls ./<TAB>

will still match the second expression '=(#b)(?)*==1' but here (?) will capture
the first 4 characters, not just the first one. The length is dependent on
previous PREFIX ("file" here).

Bug?



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