zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-users@zsh.org
Subject: Re: #conpdef and compadd -> command regex
Date: Sat, 16 Jun 2012 00:22:27 +0200	[thread overview]
Message-ID: <CAHYJk3SBimk-TNYunBM6zHgY9hikgDgMVWsa55cJbmrzYMQaFw@mail.gmail.com> (raw)
In-Reply-To: <mailbox-29608-1339788055-484725@pepper>

On 15/06/2012, Eric Smith <es@fruitcom.com> wrote:
> Thank Mikael
>
> That works but I realise that I only want completion if the
> command commences with a single underscore. How would I define a
> regex for the command that needs to be satisfied for the compadd
> rule to apply?

You can't afaik, but in your completer you can do whatever you want,
including checking what the word looks like and calling another
completer if it's not what you want. (I'll admit I don't know which
that would be in this case, _command_names is close, but _autocd could
also be called depending on options).

-- 
Mikael Magnusson


  reply	other threads:[~2012-06-15 22:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 21:40 completion oddity Danek Duvall
2012-05-22  2:42 ` Bart Schaefer
2012-05-22  5:01   ` Danek Duvall
2012-05-22  5:16     ` Danek Duvall
2012-05-22  6:35       ` Bart Schaefer
2012-05-22 16:35         ` Greg Klanderman
2012-05-22 22:30           ` Bart Schaefer
2012-05-22 22:55             ` Greg Klanderman
2012-05-22 23:06         ` Danek Duvall
2012-06-15 10:43       ` #conpdef and compadd Eric Smith
2012-06-15 11:06         ` Mikael Magnusson
2012-06-15 19:22           ` #conpdef and compadd -> command regex Eric Smith
2012-06-15 22:22             ` Mikael Magnusson [this message]
2012-05-22 16:18   ` completion oddity Greg Klanderman
2012-05-22 22:57     ` Bart Schaefer
2012-05-22 23:09       ` Greg Klanderman
2012-05-23  6:08         ` Bart Schaefer
2012-05-23  1:03       ` Danek Duvall
2012-05-23  6:31         ` Bart Schaefer
2012-05-26 21:19           ` Danek Duvall
2012-05-23  6:25     ` Bart Schaefer
2012-05-23 18:48       ` Greg Klanderman
2012-05-24  3:39         ` Bart Schaefer

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=CAHYJk3SBimk-TNYunBM6zHgY9hikgDgMVWsa55cJbmrzYMQaFw@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).