zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-users@sunsite.dk
Subject: Re: completion for printf-style format strings
Date: Fri, 03 Sep 2004 17:08:02 +0200	[thread overview]
Message-ID: <3826.1094224082@trentino.logica.co.uk> (raw)
In-Reply-To: <dc507f4a0409030750406b0e9a@mail.gmail.com>

Felix Rosencrantz wrote:
> Does anyone have code to perform completion of printf-style format strings?
> 
> I think it was suggested that it might be possible to do with 
> _regex_arguments. but not sure if there is an example somewhere or a
> utility function.

It wouldn't be possible with _regex_arguments. _regex_arguments is only
useful when completing a single command-line argument in full. It never
uses compset -P/-S to cut the current word down into chunks.

You would probably want to use patterns a lot though. Basically you need
to remove any literal characters and complete format specifications from
the front of the word. Then you can deal with any partially complete
format specifications. What might be good is to make it sufficiently
general so as to be usable for things like strftime too.

Oliver


  reply	other threads:[~2004-09-03 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 14:50 Felix Rosencrantz
2004-09-03 15:08 ` Oliver Kiddle [this message]
2004-09-07  6:50   ` Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3826.1094224082@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).