From: Mark Oteiza <mvoteiza@udel.edu>
To: zsh-workers@zsh.org
Subject: _ip: ip -6 stderr
Date: Tue, 07 Jan 2014 13:33:40 -0500 [thread overview]
Message-ID: <878uurk5ff.fsf@holos.localdomain> (raw)
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<TAB>` 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') )"
)
next reply other threads:[~2014-01-07 18:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 18:33 Mark Oteiza [this message]
2014-01-08 3:46 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878uurk5ff.fsf@holos.localdomain \
--to=mvoteiza@udel.edu \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).