zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ronan Pigott <rpigott314@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Possible to use _arguments with _regex_arguments?
Date: Wed, 18 Sep 2019 14:07:17 -0700	[thread overview]
Message-ID: <CAH+w=7aUALnw51_fFzDJbM-WXKNbLWM_iTBy=oXa9e2DM3zN-g@mail.gmail.com> (raw)
In-Reply-To: <BX3EOWYQ1AY8.LBR42DF8EFH7@rxps>

On Wed, Sep 18, 2019 at 1:39 PM Ronan Pigott <rpigott314@gmail.com> wrote:
>
> When I use '*::message:_myfunc', completion is no longer tripped up by
> options, but _myfunc always acts as if it is completing the first word
> for all normal arguments, as if $words was empty and CURRENT=1 even if
> there are many normal arguments.

I'm not familiar with all the nuances of _regex_arguments, but my
impression from looking through a couple of the places where it is
used is that $words[1] always has to be the command name.  That is, it
always expects to parse a complete command line by catenating $words
back together, so you can't have shifted the command name itself off
the front before you invoke it.  You could probably get away with
shoving a dummy command word onto the front of $words, but I haven't
made any attempt to try it.

  reply	other threads:[~2019-09-18 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  2:31 Ronan Pigott
2019-09-18 20:21 ` Ronan Pigott
2019-09-18 21:07   ` Bart Schaefer [this message]
2019-09-18 21:36     ` Ronan Pigott
2019-09-18 21:32   ` Oliver Kiddle

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='CAH+w=7aUALnw51_fFzDJbM-WXKNbLWM_iTBy=oXa9e2DM3zN-g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rpigott314@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).