Zsh Mailing List Archive
Messages sorted by:
Re: Possible to use _arguments with _regex_arguments?
- X-seq: zsh-users 24259
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ronan Pigott <rpigott314@xxxxxxxxx>
- Subject: Re: Possible to use _arguments with _regex_arguments?
- Date: Wed, 18 Sep 2019 14:07:17 -0700
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6uQLXYYpZl+vq2XshWoBKRKHPN5sAHdYgWRTjSi22l0=; b=QEhICD1uVZV/vZTNy3SK84El9rvdckGzOZZyG9y3WL5G8NCpo57BFSU7TzW5ESZD3b VVAJcLw+GyuKKyITOiaQ+/GzxqcxJRAfkdy2XhzgLahdhUjIrGkLkelyn5gwOp9UPyJ9 PuQ1KvnjqZLZogyPhMAvaBaLMyqbX/3DNNW0+ZNuhWIBiRmXvQ9RZJxGi/5GJNTQqsPn M4euyjaB+Go52EkzwKIME69NAOKbWc7/w5z5HcZ9EXdToHWQWtu1yOz93ASI9PyMsaua RzWk9LXzM+BWBJp1A+bsupxCM0hs/sYlUPUxcAX3ysDvoJ9/yR4HeD11vRuSLKH9nBNm IHRA==
- In-reply-to: <BX3EOWYQ1AY8.LBR42DF8EFH7@rxps>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <BX2RX80O9EQW.26O4G1RH2WSIK@rxps> <BX3EOWYQ1AY8.LBR42DF8EFH7@rxps>
On Wed, Sep 18, 2019 at 1:39 PM Ronan Pigott <rpigott314@xxxxxxxxx> 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 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.
Messages sorted by: