From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27298 invoked from network); 18 Jan 2007 22:48:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jan 2007 22:48:41 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 31289 invoked from network); 18 Jan 2007 22:48:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jan 2007 22:48:34 -0000 Received: (qmail 6158 invoked by alias); 18 Jan 2007 22:48:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11131 Received: (qmail 6148 invoked from network); 18 Jan 2007 22:48:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Jan 2007 22:48:26 -0000 Received: (qmail 30097 invoked from network); 18 Jan 2007 22:48:26 -0000 Received: from mail.geekisp.com (HELO starfish.geekisp.com) (216.168.135.169) by a.mx.sunsite.dk with SMTP; 18 Jan 2007 22:48:21 -0000 Received: (qmail 22428 invoked by uid 1003); 18 Jan 2007 22:48:20 -0000 Received: from clam.int.geekisp.com (HELO clam.geekisp.com) (192.168.4.38) by mail.geekisp.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 18 Jan 2007 22:48:20 -0000 Received: from clam.geekisp.com (njt@localhost.geekisp.com [127.0.0.1]) by clam.geekisp.com (8.13.8/8.12.11) with ESMTP id l0IMmJD6008036 for ; Thu, 18 Jan 2007 17:48:19 -0500 (EST) Received: (from njt@localhost) by clam.geekisp.com (8.13.8/8.13.3/Submit) id l0IMmJn2009114 for zsh-users@sunsite.dk; Thu, 18 Jan 2007 17:48:19 -0500 (EST) X-Authentication-Warning: clam.geekisp.com: njt set sender to njt@ayvali.org using -f Date: Thu, 18 Jan 2007 17:48:19 -0500 From: "N.J. Thomas" To: zsh-users@sunsite.dk Subject: directory stack expansion Message-ID: <20070118224819.GE31068@ayvali.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Given the following directory stack: $ dirs -v 0 /etc 1 /tmp 3 /home/foo I often do things like "cd ~+3", "mkdir ~+1/foo", etc. Often times, I want to be able to expand the directory. The reason for this is that the directory stack changes often, and "mkdir ~+1/foo" makes sense when "~+1" has the value of /tmp, but not much sense when it is /etc or whatever. If I recall a command from the history, "cd ~+3" might have an entirely different meaning depending on the value of the stack. Right now, the only way I can do this is by typing this at the prompt: $ cd `echo ~+1` and then hitting tab after the second backtick. Is there a way to get Zsh to get to expand without the backticks? thanks, Thomas -- N.J. Thomas njt@ayvali.org Etiamsi occiderit me, in ipso sperabo