From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21772 invoked by alias); 23 Mar 2017 21:45:56 -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: 40892 Received: (qmail 21619 invoked from network); 23 Mar 2017 21:45:56 -0000 X-Qmail-Scanner-Diagnostics: from pug.qqx.org 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(50.116.43.67):SA:0(-0.0/5.0):. Processed in 1.616457 secs); 23 Mar 2017 21:45:56 -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=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: aaron@schrab.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at schrab.com designates 50.116.43.67 as permitted sender) From: Aaron Schrab To: zsh-workers@zsh.org Subject: [PATCH] run-help-ip: Fix help for address and addrlabel Date: Thu, 23 Mar 2017 17:45:40 -0400 Message-Id: <20170323214540.1771-1-aaron@schrab.com> X-Mailer: git-send-email 2.12.1.534.g7cedf66e54 The `ip address` subcommand can be abbreviated to any substring, including just `a`. A longer substring may have been looked for here to try to reduce the likelihood of conflicts, but there still was one with `addrlabel`. Reduce both of these patterns to the shortest substring that is accepted by the `ip` command, and take care of the overlap by checking for the longer pattern first. --- Functions/Misc/run-help-ip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Functions/Misc/run-help-ip b/Functions/Misc/run-help-ip index 740af52b5..8807f9ef1 100644 --- a/Functions/Misc/run-help-ip +++ b/Functions/Misc/run-help-ip @@ -19,8 +19,8 @@ while [[ $# != 0 && $1 == -* ]]; do done case $1 in - (addr*) man ip-address ;; - (addrlabel) man ip-addrlabel ;; + (addrl*) man ip-addrlabel ;; + (a*) man ip-address ;; (l2*) man ip-l2tp ;; (li*) man ip-link ;; (ma*) man ip-maddress ;; -- 2.12.1.534.g7cedf66e54