From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15351 invoked by alias); 4 Dec 2013 18:02:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32090 Received: (qmail 530 invoked from network); 4 Dec 2013 18:02:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO, SPF_HELO_PASS,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Christian Neukirchen Subject: Re: directory alias Date: Wed, 04 Dec 2013 19:02:24 +0100 Sender: chris@juno Message-ID: <87k3fkbikv.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 141.84.9.5 In-Reply-To: (shawn wilson's message of "Tue, 3 Dec 2013 22:21:53 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) shawn wilson 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 http://chneukirchen.org