* How do I get completion to only match certain types of files
@ 1997-09-29 5:31 Gregory Gerard
1997-09-29 6:32 ` Duncan Sargeant
0 siblings, 1 reply; 2+ messages in thread
From: Gregory Gerard @ 1997-09-29 5:31 UTC (permalink / raw)
To: ZSH Users List
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?
thanks for the help,
greg
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How do I get completion to only match certain types of files
1997-09-29 5:31 How do I get completion to only match certain types of files Gregory Gerard
@ 1997-09-29 6:32 ` Duncan Sargeant
0 siblings, 0 replies; 2+ messages in thread
From: Duncan Sargeant @ 1997-09-29 6:32 UTC (permalink / raw)
To: ZSH Users List
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-09-29 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-29 5:31 How do I get completion to only match certain types of files Gregory Gerard
1997-09-29 6:32 ` Duncan Sargeant
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).