* [PATCH] run-help-ip: Fix help for address and addrlabel
@ 2017-03-23 21:45 Aaron Schrab
0 siblings, 0 replies; only message in thread
From: Aaron Schrab @ 2017-03-23 21:45 UTC (permalink / raw)
To: zsh-workers
The `ip address` subcommand can be abbreviated to any substring,
including just `a`. A longer substring may have been looked for here to
try to reduce the likelihood of conflicts, but there still was one with
`addrlabel`. Reduce both of these patterns to the shortest substring
that is accepted by the `ip` command, and take care of the overlap by
checking for the longer pattern first.
---
Functions/Misc/run-help-ip | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Functions/Misc/run-help-ip b/Functions/Misc/run-help-ip
index 740af52b5..8807f9ef1 100644
--- a/Functions/Misc/run-help-ip
+++ b/Functions/Misc/run-help-ip
@@ -19,8 +19,8 @@ while [[ $# != 0 && $1 == -* ]]; do
done
case $1 in
- (addr*) man ip-address ;;
- (addrlabel) man ip-addrlabel ;;
+ (addrl*) man ip-addrlabel ;;
+ (a*) man ip-address ;;
(l2*) man ip-l2tp ;;
(li*) man ip-link ;;
(ma*) man ip-maddress ;;
--
2.12.1.534.g7cedf66e54
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-23 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 21:45 [PATCH] run-help-ip: Fix help for address and addrlabel Aaron Schrab
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).