zsh-workers
 help / color / mirror / code / Atom feed
* Re: directory alias
       [not found] <CAH_OBidDmzECfgLVcEUmRj2+bean+WjuBvgiPV6SoE9i0kPfKA__21315.6334394172$1386127558$gmane$org@mail.gmail.com>
@ 2013-12-04 18:02 ` Christian Neukirchen
  0 siblings, 0 replies; only message in thread
From: Christian Neukirchen @ 2013-12-04 18:02 UTC (permalink / raw)
  To: zsh-workers

shawn wilson <ag4ve.us@gmail.com> writes:

> not sure if this is really a 'zsh thing' but I'm looking for a way to
> create aliases for a command. I don't want a bunch of symlinks in my
> home directory, and I don't want a universal alias for each directory
> I commonly cd into. What I want is a way to do:
> cd foo
> and it go to ~/some/deep/directory/tree/foo
> and
> cd bar
> and it go to /usr/local/some/path/bar

The obvious solution:

juno% setopt CDABLE_VARS
juno% bar=/usr/local/bin
juno% cd bar
~bar
juno% pwd
/usr/local/bin

-- 
Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-04 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH_OBidDmzECfgLVcEUmRj2+bean+WjuBvgiPV6SoE9i0kPfKA__21315.6334394172$1386127558$gmane$org@mail.gmail.com>
2013-12-04 18:02 ` directory alias Christian Neukirchen

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