From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25913 invoked from network); 29 Jun 2000 07:09:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Jun 2000 07:09:15 -0000 Received: (qmail 9551 invoked by alias); 29 Jun 2000 07:09:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12115 Received: (qmail 9544 invoked from network); 29 Jun 2000 07:09:08 -0000 Date: Thu, 29 Jun 2000 09:09:06 +0200 (MET DST) Message-Id: <200006290709.JAA04198@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Wayne Davison's message of Sun, 25 Jun 2000 01:38:07 -0700 (PDT) Subject: PATCH: Re: A couple completion glitches Wayne Davison wrote: > ... > > It still seems strange to me that (without the above suffix option) > foo* gets glob expansion but ~/foo* does not. Surely this should not > be the default even if this turns out (for some strange reason) not to > be a bug. This really wasn't intended; I didnt' think of the interaction with pattern characters in the suffix. How about this patch: it changes the meaning of the suffix style to `don't expand if there is a suffix, unless that contains something exapandable'. I still think there is a better name for this, but I still can't think of one. Bye Sven Index: Completion/Core/_expand =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_expand,v retrieving revision 1.21 diff -u -r1.21 _expand --- Completion/Core/_expand 2000/06/29 06:59:00 1.21 +++ Completion/Core/_expand 2000/06/29 07:08:49 @@ -36,7 +36,7 @@ [[ "$word" = *\$\{[^\}]# ]] && return 1 zstyle -T ":completion:${curcontext}:" suffix && - [[ "$word" = (\~*/*|\$[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]*|\$\{*\}?*) ]] && + [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] && return 1 zstyle -t ":completion:${curcontext}:" accept-exact || Index: Doc/Zsh/compsys.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v retrieving revision 1.78 diff -u -r1.78 compsys.yo --- Doc/Zsh/compsys.yo 2000/06/29 07:04:17 1.78 +++ Doc/Zsh/compsys.yo 2000/06/29 07:08:50 @@ -1888,7 +1888,8 @@ tilde or parameter expansion. If it is set to `true', the word will only be expanded if it doesn't have a suffix, i.e. if it is something like `tt(~foo)' or `tt($foo)', but not if it is `tt(~foo/)' or -`tt($foo/bar)'. The default for this style is `true'. +`tt($foo/bar)', unless that suffix itself contains characters eligible +for expansion. The default for this style is `true'. ) kindex(tag-order, completion style) item(tt(tag-order))( -- Sven Wischnowsky wischnow@informatik.hu-berlin.de