From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6472 invoked by alias); 23 Sep 2015 05:39:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36599 Received: (qmail 18802 invoked from network); 23 Sep 2015 05:39:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=/6l+3e5ieEjXFg5KGDnhmPDar8r46cRmh9qjAu4QNMc=; b=cS4IYZ77E7snEbQ2RK2sZC899Tyl12Amy+NKtYcCd4zKgqT2ATgWGHfYhb0wsNsin7 iRf7tZiEz7WlzlB4BThnXyvoab2yAE5WD4+6o8Lb0MhjDgTienZpuQpiR7aTCB7Bb4um jx8/GObO0DW12wTzQpy/tdRfGMdgu8TDBpMJCyDAV8nn9B3G/xNbqt+15Zkfd3HPGu83 Z1/l4rNW/m/7gftp/DN6eG93tQg6r60NQTxqdclcP2lqmps4NvZi9KgHnjt90bKWDR5I iS/W2jr7N0t86Viyb9NgXTlOBM4gD07THF4DA5La/soJV/x0uPNN1u5JissWRBlI06ej P0fA== X-Gm-Message-State: ALoCoQlwf63UWM8MTIc1qSigOU6OVhnJbzUibxV1Ahz+VM1PlCOnsHK/1ABMF6NybWE3pLpWOzSW X-Received: by 10.60.51.169 with SMTP id l9mr17262715oeo.64.1442986745495; Tue, 22 Sep 2015 22:39:05 -0700 (PDT) From: Bart Schaefer Message-Id: <150922223902.ZM30528@torch.brasslantern.com> Date: Tue, 22 Sep 2015 22:39:02 -0700 In-Reply-To: Comments: In reply to "Jun T." "[PATCH] complete two or more options for zsh" (Sep 20, 4:27am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] complete two or more options for zsh MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 20, 4:27am, Jun T. wrote: } Subject: [PATCH] complete two or more options for zsh } } % zsh - } } This offers zsh's options, but the following does not work: } } % zsh -v - } } Here, -v can be any other option. There's another problem, which is made worse by your change: The default thing to complete for "zsh " is options rather than script names. Prior to your change, a side-effect was that script names began to be completed as they should have been all along, which is probably why nobody noticed before. After your change, script names are never offered unless you first type at least one character that is not "-". } The reason seems to be that all the optspecs generated by } _argument -- '*:' (_sh: line 24) } look like } -v[equivalent to --verbose]: --aliases: etc. } i.e., a ':' is appended to their ends (so the option requires } an argument). } } This ':' is added by } cache+=( "${(@)^tmp}${descr}" ) (_arguments: line 282) } where $descr is equal to ':', which comes from the helpspec '*:' } passed to _arguments. Hm. Is this a bug in _arguments rather than in the way that _sh called _arguments? That is, should descr ever be a single ":"? (That _sh calls _arguments the way it does is already somewhat a problem; _arguments doesn't behave well when it's not driving the whole show.)