* Directory completion
@ 1998-10-27 2:00 Gossamer
1998-10-27 2:23 ` Michael Barnes
1998-10-27 3:02 ` Bart Schaefer
0 siblings, 2 replies; 4+ messages in thread
From: Gossamer @ 1998-10-27 2:00 UTC (permalink / raw)
To: zsh-users
I have cd aliased to 'c', and wanted to get it so it only completed
on directories ... the obvious seemed to be this:
compctl -g '*(/)' c
but it chokes on symlinks. How do I get it to recognize symlinked
directories too? I have quite a lot of them around.
bekj
--
: --Neophilic-Hacker-Grrl-Geek-Eclectic-Gay-Disabled-Boychick--
: gossamer@tertius.net.au http://www.tertius.net.au/~gossamer/
: If you can spend a perfectly useless afternoon in a perfectly
: useless manner, you have learned how to live. -- Lin Yutang
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Directory completion
1998-10-27 2:00 Directory completion Gossamer
@ 1998-10-27 2:23 ` Michael Barnes
1998-10-27 2:30 ` Bek Oberin
1998-10-27 3:02 ` Bart Schaefer
1 sibling, 1 reply; 4+ messages in thread
From: Michael Barnes @ 1998-10-27 2:23 UTC (permalink / raw)
To: zsh-users; +Cc: gossamer
try:
compctl -g '*(-/)' c cd pushd
On Tue, Oct 27, 1998 at 02:00:13AM +0000, Gossamer wrote:
>
> I have cd aliased to 'c', and wanted to get it so it only completed
> on directories ... the obvious seemed to be this:
^^^^^^^^^^^^^^
Geesh, and i though i was lazy :)
Mike
>
> compctl -g '*(/)' c
>
> but it chokes on symlinks. How do I get it to recognize symlinked
> directories too? I have quite a lot of them around.
>
>
> bekj
>
> --
> : --Neophilic-Hacker-Grrl-Geek-Eclectic-Gay-Disabled-Boychick--
> : gossamer@tertius.net.au http://www.tertius.net.au/~gossamer/
> : If you can spend a perfectly useless afternoon in a perfectly
> : useless manner, you have learned how to live. -- Lin Yutang
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Directory completion
1998-10-27 2:23 ` Michael Barnes
@ 1998-10-27 2:30 ` Bek Oberin
0 siblings, 0 replies; 4+ messages in thread
From: Bek Oberin @ 1998-10-27 2:30 UTC (permalink / raw)
To: zsh-users
Michael Barnes wrote:
> On Tue, Oct 27, 1998 at 02:00:13AM +0000, Gossamer wrote:
> > I have cd aliased to 'c', and wanted to get it so it only completed
> > on directories ... the obvious seemed to be this:
> Geesh, and i though i was lazy :)
*laughs* Actually I was simplifying. It's this:
c() { builtin cd $1 && ls --color -p -s; }
bekj
--
: --Neophilic-Hacker-Grrl-Geek-Eclectic-Gay-Disabled-Boychick--
: gossamer@tertius.net.au http://www.tertius.net.au/~gossamer/
: Let me show you yesterday, the future in the sand. Let me find
: eternity right here within your hands. -- Cadhla
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Directory completion
1998-10-27 2:00 Directory completion Gossamer
1998-10-27 2:23 ` Michael Barnes
@ 1998-10-27 3:02 ` Bart Schaefer
1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1998-10-27 3:02 UTC (permalink / raw)
To: gossamer, zsh-users
On Oct 27, 2:00am, Gossamer wrote:
> Subject: Directory completion
>
> compctl -g '*(/)' c
>
> but it chokes on symlinks. How do I get it to recognize symlinked
> directories too?
There's a whole thread about this in the zsh-users archive. Go to
http://www.zsh.org/cgi-bin/mla/wilma/users
and search for
completion on cd
The short answer is
compctl -g '*(D-/)' cd
Leave out the D if you don't want to complete directories whose names
start with a "." character.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-10-27 3:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-27 2:00 Directory completion Gossamer
1998-10-27 2:23 ` Michael Barnes
1998-10-27 2:30 ` Bek Oberin
1998-10-27 3:02 ` Bart Schaefer
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).