From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25324 invoked by alias); 7 Jan 2014 18:35:23 -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: 32238 Received: (qmail 18018 invoked from network); 7 Jan 2014 18:35:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Mark Oteiza Subject: _ip: ip -6 stderr Date: Tue, 07 Jan 2014 13:33:40 -0500 Message-ID: <878uurk5ff.fsf@holos.localdomain> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: wifi-roaming-128-4-116-34.nss.udel.edu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:mb0mG/C/hp9dpajmz1ZCvyqJRcI= Hi, On a box with ipv6 disabled, tab completing `ip` in a new shell will get error output from the `ip -6` command in _ip. For example, doing `ip a h` gives (marking the point with an underscore): $ ip a hRTNETLINK answers: Operation not supported Dump terminated elp_ Though it only happens on the first attempt tab completing in the shell, it is still annoying. Unless there's a good reason to let that error through, it should just be discarded. diff -aur a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip --- a/Completion/Unix/Command/_ip 2013-11-27 14:00:19.000000000 -0500 +++ b/Completion/Unix/Command/_ip 2014-01-07 13:10:12.299932774 -0500 @@ -40,7 +40,7 @@ ) subcmd_prefix_label=( /$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/ - ":ipaddresslabel:IP addrlabel prefix currently set:( $(ip -6 addrlabel list | sed -n 's/^prefix \([0-9a-f\.:/]*\) .*$/\1/p') )" + ":ipaddresslabel:IP addrlabel prefix currently set:( $(ip -6 addrlabel list 2>/dev/null | sed -n 's/^prefix \([0-9a-f\.:/]*\) .*$/\1/p') )" )