Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How do I get completion to only match certain types of files
- X-seq: zsh-users 1042
- From: Duncan Sargeant <dunc@xxxxxxxxxxxxxxxxx>
- To: ZSH Users List <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: How do I get completion to only match certain types of files
- Date: Mon, 29 Sep 1997 14:32:52 +0800
- In-reply-to: <199709290331.WAA13616@xxxxxxxxxxxxxxxxxxxxxx>; from Gregory Gerard on Sun, Sep 28, 1997 at 10:31:16PM -0700
- References: <199709290331.WAA13616@xxxxxxxxxxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author