From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Disable all-files completions in a directory
Date: Sun, 03 Mar 2013 11:36:28 -0800 [thread overview]
Message-ID: <130303113628.ZM5362@torch.brasslantern.com> (raw)
In-Reply-To: <CAHjjW15S7EDrZT6QSNQOFHWTerd64Fx8Z+o7Y4bu77peG4VbwQ@mail.gmail.com>
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.
next prev parent reply other threads:[~2013-03-03 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-03 18:26 joe M
2013-03-03 19:36 ` Bart Schaefer [this message]
2013-03-03 22:47 ` joe M
2013-03-04 2:30 ` Bart Schaefer
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=130303113628.ZM5362@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@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).