From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16058 invoked from network); 7 Sep 2004 06:50:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Sep 2004 06:50:24 -0000 Received: (qmail 22226 invoked from network); 7 Sep 2004 06:50:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Sep 2004 06:50:18 -0000 Received: (qmail 3831 invoked by alias); 7 Sep 2004 06:50:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7977 Received: (qmail 3821 invoked from network); 7 Sep 2004 06:50:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Sep 2004 06:50:10 -0000 Received: (qmail 21267 invoked from network); 7 Sep 2004 06:50:09 -0000 Received: from rproxy.gmail.com (HELO mproxy.gmail.com) (64.233.170.196) by a.mx.sunsite.dk with SMTP; 7 Sep 2004 06:50:09 -0000 Received: by mproxy.gmail.com with SMTP id 74so231865rnk for ; Mon, 06 Sep 2004 23:50:06 -0700 (PDT) Received: by 10.38.125.73 with SMTP id x73mr1836395rnc; Mon, 06 Sep 2004 23:50:06 -0700 (PDT) Received: by 10.38.125.19 with HTTP; Mon, 6 Sep 2004 23:50:06 -0700 (PDT) Message-ID: Date: Mon, 6 Sep 2004 23:50:06 -0700 From: Felix Rosencrantz Reply-To: Felix Rosencrantz To: Oliver Kiddle , zsh-users@sunsite.dk Subject: Re: completion for printf-style format strings In-Reply-To: <3826.1094224082@trentino.logica.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3826.1094224082@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 If _regex_arguments doesn't provide a means or even a good example. Do you think that it would make sense to modify _regex_arguments to add code that would cause it to use the compset -P/-S flags? The _regex_arguments function relies on zregexparse, which is not really documented, though it does have a dedicated test suite. Would it make sense to try to decipher that and make it try to search for just substrings of the current word? Is that possible. Or do you think this is more a task for compadd/compset? Is there an existing utility function that could be used/modified? I was thinking maybe _values might be good to look at, instead of using a hard-coded separator, maybe a regex could be used. Though it uses compvalues which is not documented or tested(!). It would be very useful to be able to complete alot of different format strings. I think you mentioned strftime since it can have multi-letter formats. I think there are a lot of useful places it could be used, like zsh prompts or the builtin print command. Also things like the date command or the find -printf flag. Again, I'm not sure that this would directly help with a reduction in typing, but I think it would help reduce the need to visit the documentation, which would be useful. -FR.