zsh-users
 help / color / mirror / code / Atom feed
From: Felix Rosencrantz <f.rosencrantz@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>, zsh-users@sunsite.dk
Subject: Re: completion for printf-style format strings
Date: Mon, 6 Sep 2004 23:50:06 -0700	[thread overview]
Message-ID: <dc507f4a040906235016f24a23@mail.gmail.com> (raw)
In-Reply-To: <3826.1094224082@trentino.logica.co.uk>

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.


      reply	other threads:[~2004-09-07  6:50 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
2004-09-07  6:50   ` Felix Rosencrantz [this message]

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=dc507f4a040906235016f24a23@mail.gmail.com \
    --to=f.rosencrantz@gmail.com \
    --cc=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).