From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6187 invoked from network); 29 Aug 2001 21:07:23 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Aug 2001 21:07:23 -0000 Received: (qmail 16684 invoked by alias); 29 Aug 2001 21:07:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15725 Received: (qmail 16673 invoked from network); 29 Aug 2001 21:07:05 -0000 Subject: Re: How to complete backquote, etc. using compsys? In-Reply-To: <1010829175252.ZM4667@candle.brasslantern.com> from Bart Schaefer at "Aug 29, 2001 05:52:52 pm" To: Bart Schaefer Date: Wed, 29 Aug 2001 22:06:58 +0100 (BST) CC: zsh-workers@sunsite.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >The question in this case (and in other cases of multiple suffix layers) >is exactly when you remove them. E.g. with a file suffix like '/', it >gets removed if you immediately press enter, but in the above case it >should not get removed. The rule we've used so far is to remove as little as was reasonable to give a special character its customary special meaning. So, for example, after auto-adding "}/" after a parameter name, ":" or "}" would result in removing both characters, "/" or " " would remove just "/", and alphabetic characters wouldn't remove anything. >should not get removed. Also with $(...) or `...`, pressing space after >the autoremovable suffix is ambiguous -- more arguments to the command, >or the next thing after it? This is indeed ambiguous. It raises the question of why we're auto-adding the ")" or "`". To be consistent with our previous practice for removable suffixes, we shouldn't be adding the suffix if it leads to such ambiguity. However, once we've got the suffix there, " " shouldn't be removing it -- it is perfectly reasonable to insert a real space immediately after a closing "`" or ")". We should only be removing the closing character if the next character typed is one that only makes sense as an addition to the command inside the substitution. -zefram