Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh - new user with questions



On 18 August 1998, Stephen Riehm writes:
 > 
 >      occaisonally I want to perform completions which are normally
 > disallowed by compctl. The simplest example is
 > 
 >      cd. "compctl -g '*(-/)' cd" will complete nicely, unless I want to cd
 > into a hidden (dot) directory. Then it doesn't
 > 
 >      complete at all. Is it possible to say that it should complete
 > non-hidden directories, unless the text typed indicates
 > 
 >      otherwise, ie: if I type "cd <tab>", I get a list of all the normal
 > directories, but if I then type .<tab> it should use the
 > 
 >      . and show me all the directories beginning with .


The following works nicely for me, with the behavior you desired:

# cd/pushd/rmdir only directories or symbolic links to directories.  If 
# none of those match, resort to shell variables
compctl -g '*(-/)' + -g '.*(-/)' -v cd pushd rmdir   

-- 

Matthew Lovell                       voice: (970) 898-6264 
Hewlett-Packard FSL                    fax: (970) 898-2510 
3404 E. Harmony Rd. MS A0         location: 3UR4
Fort Collins, CO 80528-9599         mailto:lovell@xxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author