zsh-users
 help / color / mirror / code / Atom feed
From: Duncan Sargeant <dunc@ucc.gu.uwa.edu.au>
To: ZSH Users List <zsh-users@math.gatech.edu>
Subject: Re: How do I get completion to only match certain types of files
Date: Mon, 29 Sep 1997 14:32:52 +0800	[thread overview]
Message-ID: <19970929143252.45835@ucc.gu.uwa.edu.au> (raw)
In-Reply-To: <199709290331.WAA13616@larissa.cs.trinity.edu>; from Gregory Gerard on Sun, Sep 28, 1997 at 10:31:16PM -0700

Gregory Gerard wrote on Sun September 28, at 22:31 -0700:
> I would like to restrict the 'cd' command so that it can only
> complete directories (or shell variables).  Other file types (like
> links, devices, etc.) would be gravy, but not necessary.  I could do
> the restriction in tcsh, but tcsh has other problems that caused me
> to switch to zsh.
> 
> While browsing the man page, I saw I could restrict to named
> directories, but that's not really a help.
> 
> Am I missing something in the docs?

I have in my .zshrc:
compctl -g '*(-/)' + -g '.*(-/)' + -k '(..)' cd rmdir

This works well for me, but YMMV.

cheers
,dunc
-- 
Duncan Sargeant  -  metacitizen  -  http://www.ucc.gu.uwa.edu.au/~dunc/
For brevity is very good,
Where we are, or are not understood.  -  Samuel Butler, Hudibras.


      reply	other threads:[~1997-09-29  6:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-29  5:31 Gregory Gerard
1997-09-29  6:32 ` Duncan Sargeant [this message]

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=19970929143252.45835@ucc.gu.uwa.edu.au \
    --to=dunc@ucc.gu.uwa.edu.au \
    --cc=zsh-users@math.gatech.edu \
    /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).