From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26207 invoked from network); 26 Apr 1999 13:17:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Apr 1999 13:17:25 -0000 Received: (qmail 10468 invoked by alias); 26 Apr 1999 13:17:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6112 Received: (qmail 10461 invoked from network); 26 Apr 1999 13:17:06 -0000 Message-Id: <9904261252.AA47407@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Closing quotes in completion Date: Mon, 26 Apr 1999 14:52:31 +0200 From: Peter Stephenson I wrote the following completer called _closequotes to stick before _complete; if it finds the completion is in quotes, it adds the appropriate closing quote as an ignored suffix. It works fine for simple cases, but for anything more complicated (such as file paths with a slash) the closing quote appears too far back in the string (and in that case you want to get rid of it anyway). Any ideas? I suppose using a `compctl -M' doesn't work because it doesn't match against $ISUFFIX anyway. #autoload # If the current completion is in quotes, add the closing quote. # It's a bit brutal, since when completing in segments like file paths # the quotes go in too early. We really need some way of getting # this removed automatically when there's other stuff to come. if [[ -n $compstate[quote] ]]; then compstate[restore]='' ISUFFIX="$ISUFFIX$compstate[quote]" fi return 1 -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy