From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21355 invoked from network); 12 Nov 2021 20:10:08 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Nov 2021 20:10:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=BeywsAfXi91Xsdp+EAidT6iQkgG73f5gpPwzSMrj/Bo=; b=ZlCB0wmCIxG63dk0gQ8Ws/BttR t01qGpLARolWkYPS2ogRt/nTRr8F8+vuXgbTKX6KcmilbGJjwT4k1lqeqjJn5rxKV3zETEsgCarEw Zye21hpHW5e2WsIavbewkr5njo1B+irSZ+GOSs8s+td19UJr5qfm35FilQBra612BG3KGLOGp+WDT XHG9HNkcQzz4kYlLazCP19Ox6mLOMbLY5Qyydud4LZFHb4Pg7tQBDovhqkpUYKvPkslMDxhkR6weY j/7z2ybwaS7+KmJLhVQODH7LplEBeqyZXodJFX7PG9Ts3OQjAa1To7C5c1/E1F4N5TwVe5YUPCf0A si9FEIIw==; Received: from authenticated user by zero.zsh.org with local id 1mlcs9-000LhA-0n; Fri, 12 Nov 2021 20:10:05 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mlcru-000LO5-8p; Fri, 12 Nov 2021 20:09:50 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1mlcrt-0006je-C6; Fri, 12 Nov 2021 21:09:49 +0100 cc: zsh-workers@zsh.org In-reply-to: From: Oliver Kiddle References: To: Arseny Maslennikov Subject: Re: Q: _alternative's `(( w1:d1 w2:d2 ))' form MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25892.1636747789.1@hydra> Date: Fri, 12 Nov 2021 21:09:49 +0100 Message-ID: <25893-1636747789.372237@C2gS.agl2.N2lP> X-Seq: 49574 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Arseny Maslennikov wrote: > The doc page for _alternative (citing `info zsh`, menu item `Completion > Functions') states: ... > Later on, the text for _arguments advises to escape the separating > colons between the match candidate and its description in a (( )) > action spec, due to more complex spec parsing and further optional > fields. A thorough reader of the docs might think the same is > required by _alternative as well. You're right. With _alternative, it isn't necessary to escape further colons. If you do, it's harmless. Searching the sources _file_modes does quote them, _diff_options and _git don't. I'd have expected to find more uses of the feature really but I may have not used the best regex to find them. > Is this intentional? If yes, should we fix the doc paragraph > on _alternative? Yes to both of those. Patches that improve the documentation are gratefully accepted. Oliver