From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21391 invoked by alias); 30 Aug 2018 07:44:12 -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: List-Unsubscribe: X-Seq: 43353 Received: (qmail 13543 invoked by uid 1010); 30 Aug 2018 07:44:11 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 1.941977 secs); 30 Aug 2018 07:44:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=cRET=LN=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1535615041; bh=3hHMEIart5mTZrK+/1ax0nk8feVLl2yQ1avbatSQA5A=; h=From:References:To:Subject:Date:From:Subject; b=ggdkxhfkuy/ttrM+XYhc9lFqvIdS9Ffn4PPSkyJLsA39EkN7Y+HnricpzW6wJggO2J62MaOz1T0VcrKvwWcT/ZXiqHJzlbPVi9H72ytqaRW6FOhFQCxpUry5ADu26/emsTVmIyKo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gHo5l5XoQ9b9lUc7VOBG1YitzqL9Z3Egh5Sxucv2o19LKSoMpQ3E0_ BlZKGZPfvtSrWZwSTKd2wTzh40p10ky0iXBW_mvF13xCclvHqWf1fG0a9d8roHphfv86IwLwgOgK jkzwLhNdqvkov1RAxBmlKxiQ7N.Gb2yRhoBQ9F2Ffa1zzaQv398kg cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <23257-1535491014.192975@bVQB.-_4U.RtiE> To: dana Subject: Re: PATCH: completion options update MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <50655.1535615037.1@hydra> Date: Thu, 30 Aug 2018 09:43:57 +0200 Message-ID: <50656-1535615037.515804@RqXh.6zO4.U8_o> dana wrote: > >+(( $#words > 2 )) && ign='!' > > Is this a new convention or did i miss it somehow? > > I often (a) use completion as a quick substitute for man pages (i.e., to see > which options are supported) and (b) append --help to the end of a command that > i can't get to work using the completion clues alone. Maybe that's a bizarre And in 42730 on 30th April, Matthew Martin wrote: | Is there an established position for --help and --version? Completing | them would be more complete, but also useless noise in my opinion. At the time, that message spurred me to give it some thought and I've been applying the trick with ! that dana mentions since then. There are plenty of functions where we've explicitly excluded help and version style options in the past but, where they don't naturally fit with sets/groups/variables to cover multiple exclusions, it is irksome to shove '(--help --version -h -V -?') on the front of every single argument definition. I've had dana's (b) use case happen occasionally too but it's also always useful to cut out noise. Limiting the completion to when there are no other arguments on the line seems like a good compromise to me. And it is possible to use push-input or a custom widget in the manner of run-help. However, it'd be good to hear what other people would prefer. There might be other options like wrapping the $#words check in a helper that looks up a style. > (If it *is* something we should be doing as standard, maybe a note in the guide > is warranted? Yes, a note in the guide would be useful, assuming we get to the point of having agreed to what that standard should be. Oliver