From: "Manuel Presnitz" <mpy@gmx.net>
To: zsh-users@zsh.org
Subject: Re[2]: completing files first
Date: Wed, 30 Jan 2013 15:42:11 +0100 [thread overview]
Message-ID: <201301301542110437.01358432@mail.gmx.net> (raw)
In-Reply-To: <keb122$4kj$1@ger.gmane.org>
Honestly, I do not really understand these zstyle stuff, but combining
Jesper's suggestions with my own .zshrc I found by chance, that
zstyle ':completion:*' file-patterns '*(-/):directories:directories %p(^-/):globbed-files' '*:all-files'
(note the second word ,directories', wchich is just a label, it could also be
something else) instead of
zstyle ':completion:*' file-patterns '*(-/):directories %p(^-/):globbed-files' '*:all-files'
works also with ,less' -- as in your example.
Daniel hat am 30.01.2013 um 11:44 folgendes geschrieben:
> > Are you using menu-completion? I do, and use this which works well
> for me:
> >
> > zstyle ':completion:*' file-patterns '*(-/):directories
> > %p(^-/):globbed-files' '*:all-files'
> > zstyle ':completion:*' group-order globbed-files all-files directories
>
> Yes I use setopt menucomplete
>
> Your example works sometimes. It works with "cat <TAB>" -- I get two
> separate groups named "file", the first one with files, the second with
> directories. Great!
>
> But if I try with "less <TAB>" I get only one group "file", with files
> and directories in a (alphasorted) mix. Likewise it doesn't work on my
> own completer "_myview" (see below).
>
> I tried, to no avail, adding some colons and asterices to your zstyle,
> hoping to somehow make it more general. Is it somehow possible?
>
>
> ~/.zsh/completion/_myview:
>
> local extns
>
> extns="(bmp|gif|jp([eg]|eg)|png|p[pngb]m|tif(|f)|tga|x[pb]m|asf|asx|avi|flv|m4v|mkv|mov|mpeg|mpg|vob|ts|qt|rm|we
> bm|wmv|pdf|ps|epub|mobi|html|htm|rar|zip|tar(|.(gz|bz|bz2|Z|lzo|lz|xz))|cb(r|z))|doc"
>
> _arguments \
> "*:myviewable documents:_files -g '*.(#i)($extns)(-.)'"
next prev parent reply other threads:[~2013-01-30 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 17:47 Daniel
2013-01-30 10:16 ` Jesper Nygårds
2013-01-30 11:44 ` Daniel
2013-01-30 14:42 ` Manuel Presnitz [this message]
2013-01-30 15:07 ` Re[2]: " Daniel
2013-01-30 14:41 ` Mikael Magnusson
[not found] ` <20130130144942.GA3384@kelebek.lublin.se>
2013-01-30 14:52 ` Mikael Magnusson
2013-01-30 15:04 ` Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201301301542110437.01358432@mail.gmx.net \
--to=mpy@gmx.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).