From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2770 invoked from network); 27 Mar 2000 10:42:45 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Mar 2000 10:42:45 -0000 Received: (qmail 11499 invoked by alias); 27 Mar 2000 10:42:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10271 Received: (qmail 11487 invoked from network); 27 Mar 2000 10:42:34 -0000 Date: Mon, 27 Mar 2000 12:42:31 +0200 (MET DST) Message-Id: <200003271042.MAA03959@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Sun, 26 Mar 2000 14:50:14 +0100 Subject: PATCH: Re: Problems with _expand Oliver Kiddle wrote: > I'm having problems with _expand in dev-20. > > With the glob style set for the _expand completer things don't work anymore when expding something with ~ in it: if I do cd ~/ nothing happens. I seem to remember that before, this left normal completion to go on but from tracing _expand, it seems to be trying to expand the ~ but not working. What should happen here - I'd prefer normal completion but at the very least, it should expand ~ and allow completion to carry on after that. Hm. There was a problem with the call to _requested, making it spew out a warning (and the other hunk fixes the suffix handling). But I got the original and the expanded ~ all right. Bye Sven diff -ru ../z.old/Completion/Core/_expand Completion/Core/_expand --- ../z.old/Completion/Core/_expand Mon Mar 27 11:52:58 2000 +++ Completion/Core/_expand Mon Mar 27 12:39:44 2000 @@ -66,7 +66,7 @@ [[ "$sort" = (yes|true|1|on) ]] && exp=( "${(@o)exp}" ) # If there is only one expansion, add a suitable suffix -(($#exp == 1)) && suf='' && [[ -d $exp ]] && suf='/' +(($#exp == 1)) && suf='' && [[ -d $exp && "$exp[1]" != */ ]] && suf='/' if [[ -z "$compstate[insert]" ]] ;then _description all-expansions expl 'all expansions' "o:$word" @@ -76,8 +76,10 @@ _tags all-expansions expansions original - _requested all-expansions expl 'all expansions' "o:$word" && - compadd "$expl[@]" -UQ -qS "$suf" - "$exp" + if _requested all-expansions; then + _description all-expansions expl 'all expansions' + compadd "$expl[@]" -UQ -qS "$suf" - "$exp" + fi if [[ $#exp -gt 1 ]] && _requested expansions; then if [[ "$sort" = menu ]]; then -- Sven Wischnowsky wischnow@informatik.hu-berlin.de