From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25325 invoked from network); 7 Mar 2000 11:08:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Mar 2000 11:08:15 -0000 Received: (qmail 19914 invoked by alias); 7 Mar 2000 11:07:05 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2956 Received: (qmail 19876 invoked from network); 7 Mar 2000 11:07:00 -0000 Message-ID: <38C4E2BE.AF06B2F7@u.genie.co.uk> Date: Tue, 07 Mar 2000 11:06:38 +0000 From: Oliver Kiddle X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: mkkwong@lucent.com CC: Zsh users Subject: Re: some directory changing tools to share References: <200003062114.PAA01448@w-kwong.ih.lucent.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit mkkwong@lucent.com wrote: > case $_j in > .) dirname=$dirname/.. > continue ;; > ..) dirname=$dirname/../.. > continue ;; > ...) dirname=$dirname/../../.. > continue ;; This reminds me of a useful feature of 4DOS (a shareware command.com replacement which I used to use) and I think also for shared drives in Netware. It allowed series of dots to refer to parent directories beyond the parent. So, ... refers to the parent of the parent, .... to the parent of that etc. When I first moved to UNIX, I defined a series of aliases - cd...=cd ../.. etc although I don't seem to be in the habit of using them anymore. I also realise that I could use alias -g '...'='../..' but this only works on single words. Would it be possible to add an option which extends the zsh filename generation to expand ... to ../.., .... to ../../.. etc. Would this conflict with any of the existing globbing system? The only problem I can foresee is that to refer to a directory named '...' it would be necessary to quote atleast one of the dots. Any thoughts? Oliver Kiddle