mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-15 13:34:18 +01:00
19371 plus tweak: run-help helper for ip
This commit is contained in:
parent
c01a178ece
commit
8505837f89
@ -1,5 +1,7 @@
|
||||
2014-11-13 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Artur Penttinen: 19371 plus tweak: run-help helper for ip.
|
||||
|
||||
* Marc Finet: 33687 (first and last patches): ensure length of
|
||||
working directory is correct and return as soon as there's
|
||||
an error chasing symlinks.
|
||||
|
42
Functions/Misc/run-help-ip
Normal file
42
Functions/Misc/run-help-ip
Normal file
@ -0,0 +1,42 @@
|
||||
#! zsh -f
|
||||
#
|
||||
# Install this function by placing it in your FPATH and then
|
||||
# adding to your .zshrc the line if you use run-help function:
|
||||
# autoload -Uz run-help-ip
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
man ip
|
||||
return
|
||||
fi
|
||||
|
||||
if ! man -w ip-address >/dev/null 2>&1; then
|
||||
man ip
|
||||
return
|
||||
fi
|
||||
|
||||
while [[ $# != 0 && $1 == -* ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
case $1 in
|
||||
(addr*) man ip-address ;;
|
||||
(addrlabel) man ip-addrlabel ;;
|
||||
(l2*) man ip-l2tp ;;
|
||||
(li*) man ip-link ;;
|
||||
(ma*) man ip-maddress ;;
|
||||
(mo*) man ip-monitor ;;
|
||||
(mr*) man ip-mroute ;;
|
||||
(nei*) man ip-neighbour ;;
|
||||
(netc*) man ip-netconf ;;
|
||||
(netn*) man ip-netns ;;
|
||||
(nt*) man ip-ntable ;;
|
||||
(ro*) man ip-route ;;
|
||||
(ru*) man ip-rule ;;
|
||||
(tcp*) man ip-tcp_metrics ;;
|
||||
(to*) man ip-token ;;
|
||||
(tu*) man ip-tunnel ;;
|
||||
(xf*) man ip-xfrm ;;
|
||||
(*) man ip ;;
|
||||
esac
|
||||
|
||||
return $?
|
Loading…
Reference in New Issue
Block a user