From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3293 invoked from network); 29 Sep 1997 06:43:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 29 Sep 1997 06:43:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id CAA21740; Mon, 29 Sep 1997 02:33:32 -0400 (EDT) Resent-Date: Mon, 29 Sep 1997 02:33:11 -0400 (EDT) Message-ID: <19970929143252.45835@ucc.gu.uwa.edu.au> Date: Mon, 29 Sep 1997 14:32:52 +0800 From: Duncan Sargeant To: ZSH Users List Subject: Re: How do I get completion to only match certain types of files References: <199709290331.WAA13616@larissa.cs.trinity.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <199709290331.WAA13616@larissa.cs.trinity.edu>; from Gregory Gerard on Sun, Sep 28, 1997 at 10:31:16PM -0700 Resent-Message-ID: <"uXhYs.0.zI5.ckqBq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1042 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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.