zsh-workers
 help / color / mirror / code / Atom feed
* _ip: ip -6 stderr
@ 2014-01-07 18:33 Mark Oteiza
  2014-01-08  3:46 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Oteiza @ 2014-01-07 18:33 UTC (permalink / raw)
  To: zsh-workers


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') )"
 )
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: _ip: ip -6 stderr
  2014-01-07 18:33 _ip: ip -6 stderr Mark Oteiza
@ 2014-01-08  3:46 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2014-01-08  3:46 UTC (permalink / raw)
  To: zsh-workers

On Jan 7,  1:33pm, Mark Oteiza wrote:
} 
} 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

Whoever committed/pushed this to git did not update ChangeLog.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-08  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-07 18:33 _ip: ip -6 stderr Mark Oteiza
2014-01-08  3:46 ` Bart Schaefer

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).