From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9603 invoked by alias); 19 Aug 2016 16:08:06 -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: 39068 Received: (qmail 16004 invoked from network); 19 Aug 2016 16:08:06 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com 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(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.151197 secs); 19 Aug 2016 16:08:06 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=wLRmLO8tplYLp8+M 5oMlO6Qcx3s=; b=iJV/D4I4bzXcYWXjy+W8yOyCucAa9veEa6yKCEBvmBSZtcAQ wn9bRa24spmoa68ApQOzG7q56F8EheYpRIHV5t7PfT5rOSuFWCI2F/DjOQpiMBGJ TZy2ZM47h+lmn7n1ld5aelGOlwtQkpAg/N5CmvaVjjrwD3n6v/NM4BYJl7c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=wLRmLO8tplYLp8+ M5oMlO6Qcx3s=; b=rLErMvfaRmPg991N/sSFV/XoRmnEQP1p4vxoA9jbziOqvP0 3ST+FQeLG/cxmw5sbgB/U5S7m+/xmNBRylIFweL4DB7MFcj3te6YGKMNcxHkZXIX roCqxoNs4cG/1hNb3mpjvCptuNl6j3hzyeaUTYrgrbYHj0DLN8j/H2ZMLEMQ= X-Sasl-enc: kefSD+iXoB4H2zxsQPAKQ7VkeKaa0vnRZFq1RRfCkYGj 1471622316 Date: Fri, 19 Aug 2016 15:58:29 +0000 From: Daniel Shahaf To: Stefano Balzan Cc: zsh-workers@zsh.org Subject: Re: Zsh Completion - Bug report Message-ID: <20160819155829.GA3389@fujitsu.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Stefano Balzan wrote on Fri, Aug 19, 2016 at 12:10:02 +0200: > Hello, > I've probably found a bug in the 'ip neigh' commands set. > Zsh completion sugguests using 'lladr' instead of 'lladdr' resulting in the > following error: > "Error: either "to" is duplicate, or "lladr" is a garbage." > > It took me a while to find the subtle difference, since I rarely use the ip > tools and it could be misleading for several users. Thanks: diff --git Completion/Unix/Command/_ip Completion/Unix/Command/_ip index 1e39491..9833cdb 100644 --- Completion/Unix/Command/_ip +++ Completion/Unix/Command/_ip @@ -285,7 +285,7 @@ local -a neigh_add_cmds _regex_words neigh-add-commands "neighbour add command" \ 't*o:add new neighbour IP address:$subcmd_ipaddr' \ 'dev:specify network device:$subcmd_dev' \ - 'l*ladr:specify link layer (MAC) address or null:$subcmd_lladdr' \ + 'l*ladrr:specify link layer (MAC) address or null:$subcmd_lladdr' \ 'n*ud:specify neighbour unreachability detection state:$subcmd_nud' # to-address without keyword can appear first neigh_add_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") One other issue: the man page synopsis is . ip neigh { add | del | change | replace } { ADDR [ lladdr LLADDR ] … } … . but the word "lladdrr" is completed at argv[3], not at argv[4] as I'd expect from the synopsis. I'm not familiar with ip(8) so I'll leave investigating this to someone else... Cheers, Daniel