From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26671 invoked by alias); 3 Mar 2013 19:36:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31109 Received: (qmail 16149 invoked from network); 3 Mar 2013 19:36:31 -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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130303113628.ZM5362@torch.brasslantern.com> Date: Sun, 03 Mar 2013 11:36:28 -0800 In-reply-to: Comments: In reply to joe M "Disable all-files completions in a directory" (Mar 3, 1:26pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Disable all-files completions in a directory MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Mar 3, 1:26pm, joe M wrote: } } Is it possible to disable completions on all-files in some directories? Depends on what you mean by "in". (William J. Clinton, 1998) If you mean "Is it possible to disable completions on all-files when the value of $PWD matches certain directories?" then yes, you can use zstyle -e to include/omit all-files from tag-order as necessary. If you mean "... any time completion reaches certain directories, even if I'm completing a path that begins somewhere above that directory in the directory tree?" then the answer is probably no. However ... You might experiment with using the file-patterns style to break up the files into groups regardless of what directory you are in. For example: zstyle ':completion:*' file-patterns \ '*([1,10]):first-ten-files' \ '*([11,30]):second-twenty-files' \ '*([31,-1]):all-remaining-files' Now when you press TAB you'll be offered at most the first-ten-files. You can advance to the next twenty with the _next_tags widget (bound by default to control-x n), and then to all the rest of the files with one more tap of ^Xn. If you combine this with, for example, zstyle ':completion:*' file-sort modification then you'll always be offered the ten most recent files, etc.