From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24805 invoked from network); 9 Mar 2000 15:39:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 2000 15:39:09 -0000 Received: (qmail 2551 invoked by alias); 9 Mar 2000 15:39:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10028 Received: (qmail 2488 invoked from network); 9 Mar 2000 15:38:57 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: PATCH: _cd and $PWD in $cdpath Date: Thu, 9 Mar 2000 18:36:36 +0300 Message-ID: <000001bf89dd$414c2430$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0001_01BF89F6.669C6970" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_0001_01BF89F6.669C6970 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit If you enable grouping and complete cd while in some directory from cdpath, everything is listed twice (once as local and once as cdpath). In case of heavily populated directory it is annoying. This simplistic fix removes $PWD from $cdpath before completing. It won't work for symlinks in general case - but, hopefully, it is rare. Real solution would require stat'ing every file in cdpath. It is attached because of really long lines -andrej Have a nice DOS! B >> ------=_NextPart_000_0001_01BF89F6.669C6970 Content-Type: application/octet-stream; name="_cd.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="_cd.diff" --- Completion/Builtins/_cd.org Thu Dec 23 18:51:12 1999=0A= +++ Completion/Builtins/_cd Thu Mar 9 18:22:33 2000=0A= @@ -38,7 +38,7 @@=0A= _path_files -/=0A= else=0A= local tmpcdpath=0A= - tmpcdpath=3D(${(@)cdpath:#.})=0A= + tmpcdpath=3D(${${(@)cdpath:#.}:#$PWD})=0A= _alternative \=0A= 'local-directories:local directories:_path_files -/' \=0A= "path-directories:directories in cdpath:_path_files -W tmpcdpath -/"=0A= ------=_NextPart_000_0001_01BF89F6.669C6970--