From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2860 invoked from network); 28 Aug 2001 15:52:14 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Aug 2001 15:52:14 -0000 Received: (qmail 11925 invoked by alias); 28 Aug 2001 15:52:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15719 Received: (qmail 11912 invoked from network); 28 Aug 2001 15:51:57 -0000 From: Bart Schaefer Message-Id: <1010828155058.ZM2724@candle.brasslantern.com> Date: Tue, 28 Aug 2001 15:50:58 +0000 In-Reply-To: <3B8B6600.54A33D8E@yahoo.co.uk> Comments: In reply to Oliver Kiddle "Re: How to complete backquote, etc. using compsys?" (Aug 28, 10:36am) References: <20010821204255.64C6417403@puel.sfc.wide.ad.jp> <3B84D18C.19BA712@yahoo.co.uk> <1010823180146.ZM25810@candle.brasslantern.com> <3B8B6600.54A33D8E@yahoo.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: How to complete backquote, etc. using compsys? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii [Redirected to -workers] On Aug 28, 10:36am, Oliver Kiddle wrote: } Subject: Re: How to complete backquote, etc. using compsys? } } Bart Schaefer wrote: } > } > On Aug 23, 10:49am, Oliver Kiddle wrote: } > } } > } No, you didn't miss an option. The new completion system just doesn't } > } complete the backquote. [...] At the moment, I don't think the shell } > } code can tell if it is in $( .. ) } > } > Yes, it can tell that it's in $(...) or `...`. } } compstate[quote] and compstate[quoting] indicate if it is in `...` but } how can it tell it's in $(...)? Hmm, at the moment perhaps it doesn't, but it could look at $LBUFFER to find out. } The level of nesting would also be useful. It should be easy to add a special parameter that gives the same info as the %_ prompt expansion. I tried ${(%):-%_} but (not surprisingly) the parser stack isn't "live" during the execution of the completion function. } [...] it would be useful to have the backquote as a removable } suffix because it is quicker to press space than backquote. The problem is that you end up with too many layers of autoremovable suffixes. When completing a path name within backticks, you can't get both the trailing / on a directory name and the trailing backtick. } Also, without multios the closing } bracket of $(<...) should always be completed. It would have to be an autoremovable suffix, too; `echo $(