From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6328 invoked from network); 2 Jan 2003 16:06:28 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 2 Jan 2003 16:06:28 -0000 Received: (qmail 24525 invoked by alias); 2 Jan 2003 16:06:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18047 Received: (qmail 24511 invoked from network); 2 Jan 2003 16:06:19 -0000 Date: Fri, 3 Jan 2003 00:06:16 +0800 From: James Devenish To: zsh-workers@sunsite.dk Subject: Options for Completion/Zsh/Command/_cd? Message-ID: <20030102160616.GA8414@gulag.guild.uwa.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Hi, I always use a 'custom' version of _cd because: - I don't want tab completion to consider $cdpath (in fact, I hate when that happens!) - I like CVS and .svn directories to be ignored. I achieve this by scrubbing out portions of _cd and then adding an -F option to _path_files. It would probably be better if I were to be able to set some options in my .zshrc rather than rolling a new _cd with each release. What is the canonical or preferred way of passing options to completion functions? I can envisage being able to solve my $cdpath problem by being able to do, say, setopt comp_cd_nocdpath and do my directory exclusions by setting COMP_CD_PATH_OPTIONS=-F "(*CVS *.svn)" I assume completion scripts can could pick up the environment variable, but is there a way to convey the setopt to the function? If not, would it be necessary to set some environment variable, ala COMP_CD_OPTIONS=nocdpath Are they any examples that anyone knows of? I'm willing to bother doing the necessary patches, but my prowess with zsh completion functions is at the novice end of the scale. (Having said that, though, I have a completion function for Subversion version control: _svn, which I should share sometime.)