Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion display question
- X-seq: zsh-workers 27686
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxx>
- Subject: Re: completion display question
- Date: Sun, 07 Feb 2010 21:24:57 -0800
- In-reply-to: <19308.26758.828534.571441@xxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <19308.26758.828534.571441@xxxxxxxxxxxxxxxxxx>
On Feb 5, 1:50pm, Greg Klanderman wrote:
}
} I was wondering if there's some way for completion listings to
} indicate the common portion
It'd be nice if this worked:
zstyle -e ':completion:*:*:*:*' list-colors \
'reply=("=(#b)(${(q)compstate[unambiguous]})*=0=01;31")'
Unfortunately the list-colors style is evaluated "too early," before
the completion internals have assigned compstate[unambiguous].
So I suggest you start from the following and try tweaking the
(${(q)PREFIX}) part until you get something close enough to what
you want:
zstyle -e ':completion:*:*:*:*' list-colors \
'reply=("=(#b)(${(q)PREFIX})*=0=01;31")'
E.g. you may want (#b)*(${(q}PREFIX:t})* or something like that, and you
may want different patterns for different contexts.
Replace "01;31" with another color spec if you don't like red. Also (q)
may not be sufficient to quote the prefix for pattern purposes.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author