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

Re: PATCH: first go at directory info in completion.



Hi,

I was just curious if you've fiddled with this any more since you
posted it. I found it commented out in my .zshrc earlier today and
realized that while it's a bit annoying to keep on at all times, it's
quite useful to have bound to another key. eg,

zstyle ':completion:dirprop:*' file-list dirprop=user.notes # with my
follow-up patch
zstyle ':completion:dirprop:*' dirinfo-format '%f '${(%):-%F{11}}%i${(%):-%f}
zle -C dirprop complete-word _generic
bindkey "^_^V"    dirprop

On 18 August 2009 12:33, Peter Stephenson <pws@xxxxxxx> wrote:
> This is work in progress, which won't be committed, so I'm interested in
> comments about tweaks (I am not interested in comments about wholesale
> rewrites and upgrades of the
> wouldn't-it-be-great-if-everything-were-much-much-better variety in this
> thread; that's not going to happen).
>
> The file-list style can now take a value dirinfo=<filename>.  If
> <filename> exists in a directory, then completion lists show the
> contents of <filename> together with the directory.  The style
> dirinfo-format can be used to change the display:  %f is the base
> filename of the directory, %d is the path to the directory (the bit
> usually stripped in completion lists), %i is the contents of
> <filename>.
>
> The main problem at the moment seems to be that whenever you have a
> directory with information the formatting of the entire completion list
> becomes one-per-line.  Grouping would improve this.  However, I'm a bit
> worried that this happens at too low a level to add a completion group
> (i.e. a different compadd with a different -J or -V option) at this
> point consistent with existing tags and labels, which is why I've
> stopped at this point for now.

-- 
Mikael Magnusson



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