From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15853 invoked from network); 7 Jun 2000 15:28:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jun 2000 15:28:51 -0000 Received: (qmail 19564 invoked by alias); 7 Jun 2000 15:28:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11799 Received: (qmail 19554 invoked from network); 7 Jun 2000 15:28:31 -0000 From: "Bart Schaefer" Message-Id: <1000607152808.ZM8074@candle.brasslantern.com> Date: Wed, 7 Jun 2000 15:28:08 +0000 In-Reply-To: <200006070646.IAA11684@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: expansion (was: Re: PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9))" (Jun 7, 8:46am) References: <200006070646.IAA11684@beta.informatik.hu-berlin.de> <200006070707.JAA11585@beta.informatik.hu-berlin.de> In-Reply-To: <200006070707.JAA11585@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: expansion (was: Re: PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9))" (Jun 7, 9:07am) X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: expansion (was: Re: PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9)) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 7, 8:46am, Sven Wischnowsky wrote: } Subject: PATCH: expansion (was: Re: PATCH: Re: blah*[TAB] (difference betw } } } Bart Schaefer wrote: } } > It was 11777. Confusion about a double-negative, or something like that. I'm going to stop responding to articles with numbers ending in three 7s. } > Sven changed a test to be: } > } > if ! zstyle -T ":completion:${curcontext}:" add-space; then } } I know all that. Of course YOU know all that. Wayne might not. } And I still insist, that the current behaviour is } correct; from the docs: } } This style is used by the tt(_expand) completer. If it is `true' (the } default), a space will be inserted after all words resulting from the } expansion (except for directory names which get a slash). } } So, it appends a space to the generated expansion. } } What you folks really want is a more sophisticated add-space Actually what I want is some way to know without looking at the docs whether a style defaults to `true' when not set or to `false' when not set. Back in the mists of time we used to have options whose names started with `no' so that you'd know that setting it turned something off, rather than on, and there was no non-`no' (I sound like a backup singer for a '50s rock group) option to unset instead, so looking at the output of `setopt' was enough to tell you what the heck was going on: The default behavior changed only when something became true, and "not set" always meant false. Pardon me, I just go off on that from time to time. I'm not really suggesting that we redo it all again at this point. Anyway, I assumed without looking that add-space was supposed to default to false when not set, since that had been the previous behavior. } namely (I'm guessing ;-): if add-space if false, never add } a space; if it is true, add a space if the generated word is the name } of an existing file. I just speculated exactly this in my reply to the expand-or-complete thread, but I don't think it makes as much sense as does appending a space only when multiple words result. } But then I would insist, that we change add-space to: } } - true: always add a space (after all, one might want to use it to } generate names of non-existing files) } - false: never add a space } - exisiting: add a space only if the word is the name of an } exisiting file } } Ok? Whether that is "ok" depends more on what the behavior is when it is not set at all than on what the possible settings are. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net