From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id c1a9c7f7 for ; Wed, 18 Sep 2019 21:08:13 +0000 (UTC) Received: (qmail 11106 invoked by alias); 18 Sep 2019 21:08:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24259 Received: (qmail 19623 invoked by uid 1010); 18 Sep 2019 21:08:07 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f44.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25573. spamassassin: 3.4.2. Clear:RC:0(209.85.167.44):SA:0(-1.9/5.0):. Processed in 3.366245 secs); 18 Sep 2019 21:08:07 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.44 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6uQLXYYpZl+vq2XshWoBKRKHPN5sAHdYgWRTjSi22l0=; b=AnwrEmSk8SgR8zCGsxlqLMY5hrtfxt2BgSJ3GNcTRXdYl84Bo+BMWKoyT33r5Jhxjy iqPS0lGGoiV5jvtcXpwRnSnwUmKL4B4InP3CxaHcm9YNZqqRNZioYaHbvw0SkPXhGGsr aA/dh9ySiPsCiNRJGD6LGPrFX4OGstJjahJeQPr6gimAIAaBhiEDoTy0iL6mq6EzS+lD HBKL7m7k0jDK0itUbVFxGMbDysGETuyed3Btz/1dlsqr/N0kEsKeTBwGDu/ZWcszzsqQ uhh+uiUDMiDF6X0egB3pi/cmSxQ2mClg10aZcqD2k4AtRuYhb+5REtchWIW+RXCgZwo/ wIxg== X-Gm-Message-State: APjAAAUxYz8kxiw4Ewtpg96IiCGfYyqM51loeFCd411aKwgVR6RKoUMs AU2gLoPz+Sbe1xO8KHRjXIJ6ZxgLgYW9WySjvt8YX4oYizM= X-Google-Smtp-Source: APXvYqxzK2wkLXjcnbLN++lXNQDXb4Z8ZnrMVItrslNEXVxw/qiftaiafvdL5fI9gCcCR4bhHuh954ji0kQ9OpgPKkM= X-Received: by 2002:ac2:5a4c:: with SMTP id r12mr3059170lfn.52.1568840849385; Wed, 18 Sep 2019 14:07:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 18 Sep 2019 14:07:17 -0700 Message-ID: Subject: Re: Possible to use _arguments with _regex_arguments? To: Ronan Pigott Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Wed, Sep 18, 2019 at 1:39 PM Ronan Pigott 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.