From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3886 invoked from network); 5 Oct 2000 13:49:33 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Oct 2000 13:49:33 -0000 Received: (qmail 2017 invoked by alias); 5 Oct 2000 13:48:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12899 Received: (qmail 2009 invoked from network); 5 Oct 2000 13:48:56 -0000 Date: Thu, 5 Oct 2000 15:48:52 +0200 (MET DST) Message-Id: <200010051348.PAA13722@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Thu, 7 Sep 2000 14:40:38 +0000 Subject: Re: PATCH: RE: Trivial patches for FreeBSD Bart Schaefer wrote: > On Sep 7, 10:38am, Sven Wischnowsky wrote: > } > } Andrej Borsenkow wrote: > } > } > compadd "$@" - /boot/kernel/*.ko(N:t) /modules/*.ko(N:t) && ret=0 > } > } That sounds reasonable. I've changed in some other places, too (anyone > } who uses _mailboxes please check my work there). > > Looks OK, but: > > Is there EVER a case where we want the completion system to fail with a > "no match" error, or to return a glob pattern instead of an actual file > name? > > Maybe _main_complete should setopt nullglob nocshnullglob and have done > with it. Interestingly, in _main_complete:19 we see: setopt localoptions nullglob ... And it seems to have been there for quite some time. Maybe we (ok, I) got confused because in some places we use the foo(N) trick to turn a normal string into a pattern to avoid having to explicitly test for the existence of files searched. But since cshnullglob overrides nullglob, we should probably unset that in _main_complete, as Bart suggests... Bye Sven Index: Completion/Core/_main_complete =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v retrieving revision 1.40 diff -u -r1.40 _main_complete --- Completion/Core/_main_complete 2000/08/03 13:35:44 1.40 +++ Completion/Core/_main_complete 2000/10/05 13:30:51 @@ -16,8 +16,8 @@ # which makes the output of setopt and unsetopt reflect a different # state than the global one for which you are completing. -setopt localoptions nullglob rcexpandparam extendedglob noshglob -unsetopt markdirs globsubst shwordsplit nounset ksharrays +setopt localoptions nullglob rcexpandparam extendedglob noshglob \ + nomarkdirs noglobsubst noshwordsplit unset noksharrays nocshnullglob exec