zsh-workers
 help / color / mirror / code / Atom feed
From: James Devenish <j-devenish@users.sourceforge.net>
To: zsh-workers@sunsite.dk
Subject: Options for Completion/Zsh/Command/_cd?
Date: Fri, 3 Jan 2003 00:06:16 +0800	[thread overview]
Message-ID: <20030102160616.GA8414@gulag.guild.uwa.edu.au> (raw)

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.)



             reply	other threads:[~2003-01-02 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02 16:06 James Devenish [this message]
2003-01-02 16:43 ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030102160616.GA8414@gulag.guild.uwa.edu.au \
    --to=j-devenish@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).