From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15362 invoked from network); 21 Feb 2000 09:12:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Feb 2000 09:12:08 -0000 Received: (qmail 26234 invoked by alias); 21 Feb 2000 09:12:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9805 Received: (qmail 26226 invoked from network); 21 Feb 2000 09:12:02 -0000 Date: Mon, 21 Feb 2000 10:12:01 +0100 (MET) Message-Id: <200002210912.KAA04708@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Mon, 21 Feb 2000 04:11:19 +0000 Subject: Re: Path completion causing ambiguous path tail to disappear Bart Schaefer wrote: > This is not exactly a complaint, because I can (almost) get the behavior I > want by using a style ... rather it's a question of whether the default > behavior should be different. > > I have my zsh sources under /usr/src/local/zsh/. With dev-19: > > zagzig[36] cd /usr/s/l/ > > The valid completions at this point should be > > /usr/src/local /usr/src/linux /usr/share/libtool /usr/share/locale > > However, what happens is that the word on the command line is *shortened*, > leaving me with > > zagzig[36] cd /usr/s/ > > with the cursor on top of the final `/'. Now, I don't mind the cursor > moving back to that point if that's where I need to disambiguate, but I > was surprised that zsh deleted the tail of the path rather than simply > feeping, or displaying the list. Slight problem with building the correct $SUFFIX for testing. Bye Sven diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files --- ../z.old/Completion/Core/_path_files Fri Feb 18 15:42:42 2000 +++ Completion/Core/_path_files Mon Feb 21 10:11:36 2000 @@ -420,13 +420,13 @@ fi if [[ "$tpre" = */* ]]; then - PREFIX="${donepath}${linepath}${cpre}${tpre%%/*}" - SUFFIX="/${tsuf#*/}" tmp2="${cpre}${tpre%%/*}" + PREFIX="${donepath}${linepath}${tmp2}" + SUFFIX="/${tpre#*/}${tsuf#*/}" else - PREFIX="${donepath}${linepath}${cpre}${tpre}" - SUFFIX="${tsuf}" tmp2="${cpre}${tpre}" + PREFIX="${donepath}${linepath}${tmp2}" + SUFFIX="${tsuf}" fi if (( tmp4 )) || -- Sven Wischnowsky wischnow@informatik.hu-berlin.de