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

Re: Completion in pwd before subdirecories

Jesper Holmberg wrote:

> > zstyle ':completion:*' group-name ''
> > zstyle ':completion:*' group-order files directories
> I tried this, and I think I understand what it does, but it doesn't make
> any difference. If I have this:

Files are completed with the all-files and globbed-files tags so no, it
doesn't work.

You need something like:

  zstyle ':completion:*' file-patterns \
      '*(-/):directories %p(^-/):globbed-files' '*:all-files'
  zstyle ':completion:*' group-name ''
  zstyle ':completion:*' group-order \
      globbed-files all-files directories

Unfortunately, that will now break for any completion which specifies a
glob qualifier such as _chown. I've been meaning to go through adding
`#q' into all of them to allow this.

I'm not quite sure whether the default file-patterns style shouldn't
use %p(^-/) for globbed-files anyway. What if we want to glob directory
names from a completion function? Comments on this should probably go
to -workers.


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