From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1949 invoked from network); 13 Feb 2001 09:22:08 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Feb 2001 09:22:08 -0000 Received: (qmail 6151 invoked by alias); 13 Feb 2001 09:22:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13459 Received: (qmail 6139 invoked from network); 13 Feb 2001 09:21:57 -0000 Date: Tue, 13 Feb 2001 10:21:53 +0100 (MET) Message-Id: <200102130921.KAA12166@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Adam Spiers's message of Mon, 12 Feb 2001 20:41:47 +0000 Subject: PATCH: Re: bug in directory completion with tilde expansion? Adam Spiers wrote: > My funny combination of option settings strike again ... > > This time the culprit seems to be glob_complete: > > $ zsh -f > $ echo $ZSH_VERSION > 3.1.9-dev-8 > $ autoload compinit; compinit > $ ls ~/soft > $ ls ~/software/ <-- OK, trailing slash > $ setopt glob_complete > $ ls ~/soft > $ ls ~/software <-- broken, no trailing slash > > The problem only exists for completion of tilde-prefixed paths. Yes, that made it think the string was a pattern... Bye Sven Index: Completion/Core/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v retrieving revision 1.35 diff -u -r1.35 _path_files --- Completion/Core/_path_files 2000/11/08 09:20:43 1.35 +++ Completion/Core/_path_files 2001/02/13 09:20:46 @@ -622,7 +622,7 @@ compquote tmp4 tmp1 fi if [[ -z "$_comp_correct" && -n "$compstate[pattern_match]" && - "$PREFIX$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then + "${PREFIX#\~}$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then compadd -Qf -W "$prepath$realpath" "$pfxsfx[@]" "$mopts[@]" \ -M "r:|/=* r:|=*" - "$linepath$tmp4${(@)^tmp1}" else -- Sven Wischnowsky wischnow@informatik.hu-berlin.de