zsh-users
 help / color / mirror / code / Atom feed
From: "G. Khalsa"<gkhalsa@jeppesen.com>
To: <zsh-users@math.gatech.edu>
Subject: Completion of cd type functions?
Date: Thu, 29 Oct 98 13:18:01 -0700	[thread overview]
Message-ID: <9810299096.AA909663631@smtp-gw.jeppesen.com> (raw)


Hi,

I just switched from tcsh to zsh.

In tcsh I frequently defined aliases to cd directly to various directories and 
used completion to move further from these directories:

Example:

alias cxxsrc 'cd ~/development/source/cxx/\!*'
complete cxxsrc "p@1@D:$HOME/development/source/cxx@"

This way I can just type cxxsrc from anywhere and have it complete only with 
directories in $HOME/development/source/cxx.

Can I do this somehow in zsh (simply)?  This seems pretty basic (it isn't even a
FAQ) but I can't figure it out. I got it to sort of work using a function that 
invokes "find" but it is deadly slow.

As far as I understand it I create a function:
cxxsrc() { cd $HOME/development/source/cxx/$* }
but the completion part eludes me.

Unfortunately the lete2ctl script fails when I try to run it so I can't get all 
my nifty tcsh completions translated automatically.


Thanks

Gurutej Khalsa



             reply	other threads:[~1998-10-29 12:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-29 20:18 G. Khalsa [this message]
1998-10-29 13:23 ` Peter Stephenson
1998-10-29 15:29   ` Michael Barnes

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=9810299096.AA909663631@smtp-gw.jeppesen.com \
    --to=gkhalsa@jeppesen.com \
    --cc=zsh-users@math.gatech.edu \
    /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).