From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19259 invoked from network); 27 May 1999 09:35:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 May 1999 09:35:24 -0000 Received: (qmail 19678 invoked by alias); 27 May 1999 09:35:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6356 Received: (qmail 19671 invoked from network); 27 May 1999 09:35:06 -0000 From: "Bart Schaefer" Message-Id: <990527093449.ZM24201@candle.brasslantern.com> Date: Thu, 27 May 1999 09:34:49 +0000 In-Reply-To: <199905270644.IAA09079@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Some possible bugs..." (May 27, 8:44am) References: <199905270644.IAA09079@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: Some possible bugs... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 27, 8:44am, Sven Wischnowsky wrote: } Subject: Re: Some possible bugs... } } > file-completion. Another problem is that if you } > type: } > ls "one" } > and get: } > ls "one two" } > and then type the next couple of characters and } > press tab again, like so: } > ls "one two f" } > no completion is done at all. } > Bash does this type of thing quite nicely. It might } > be an idea to take a leaf from their book, so to } > speak. } } The problem is that in things like `zsh -c "ls ' one doesn't want } the shell to treat the `"ls ' as one string. So when completing inside } quotes, zsh treats words separated by spaces as outside the quotes. How hard would it be to make this context-sensitive? For example, when the effective compctl says to complete file names, treat the entire quoted string as one word and attempt to complete it as a file (this is what bash appears to do); similary for command names or anything else that normally results in a single shell "word"; otherwise, complete the way it's presently done. This might require another compctl option, similar to using compctl -x ... -l '' ... except that the "range of command line words that are considered to be arguments" is a single word that has to be split at IFS before completing. So to get the current behavior you'd use something like (writing old style) compctl -x 'c[-1,-c]' -1 -l '' -- zsh where I'm using -1 as this new option I've described for no better reason than that I can't remember which (if any) letters are left for compctl. This would also mean that, in the case where a single word such as a file name is expected to result, zsh could automatically close the quotes and append a space after the closing quote. This so-called -1 option could apply to any other flag that followed it, not just -l ... generically, it would mean "unquote and split the current word, find a new current word after the split, then complete using the following flags, and finally requote the result." -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com