From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22614 invoked from network); 5 Nov 1999 15:48:37 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Nov 1999 15:48:37 -0000 Received: (qmail 26751 invoked by alias); 5 Nov 1999 15:48:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8573 Received: (qmail 26744 invoked from network); 5 Nov 1999 15:48:26 -0000 Date: Fri, 5 Nov 1999 16:48:21 +0100 (MET) Message-Id: <199911051548.QAA11447@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Zefram's message of Fri, 5 Nov 1999 15:20:20 +0000 (GMT) Subject: Re: Bug with parameter expansion Zefram wrote: > Sven Wischnowsky wrote: > >Tanaka Akira wrote: > >> Maybe, `~' should be treated as `='? > > > >Yep. > > Nope. ~ in the middle of a word is special if EXTENDED_GLOB is set. I was about to say: I had exactly the same idea, had written the mail and the patch this way and then checked. The `~' is only special if there are other glob special characters. So I didn't change it. ... but of course, this isn't correct because bslashquote() doesn't test if there are other special characters. Oh well... Bye Sven diff -u oldsrc/utils.c Src/utils.c --- oldsrc/utils.c Fri Nov 5 16:45:51 1999 +++ Src/utils.c Fri Nov 5 16:46:19 1999 @@ -3075,8 +3075,9 @@ } else if (ispecial(*u) && ((*u != '=' && *u != '~') || - (u == s || (isset(MAGICEQUALSUBST) && - (u[-1] == '=' || u[-1] == ':')))) && + u == s || + (isset(MAGICEQUALSUBST) && (u[-1] == '=' || u[-1] == ':')) || + (*u == '~' && isset(EXTENDEDGLOB))) && (!instring || (isset(BANGHIST) && *u == (char)bangchar) || (instring == 2 && -- Sven Wischnowsky wischnow@informatik.hu-berlin.de