From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 637 invoked by alias); 30 Jan 2013 11:44:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17623 Received: (qmail 21172 invoked from network); 30 Jan 2013 11:44:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.3 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Daniel Subject: Re: completing files first Date: Wed, 30 Jan 2013 11:44:02 +0000 (UTC) Message-ID: References: X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c83-249-23-194.bredband.comhem.se User-Agent: slrn/1.0.1 (Linux) > 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 " -- I get two separate groups named "file", the first one with files, the second with directories. Great! But if I try with "less " 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)(-.)'"