netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 1/2] ip: Make uniform the use of synonyms list, show and lst
@ 2015-03-16  9:59 Mark Einon
  2015-03-16  9:59 ` [PATCH iproute2 2/2] ip: Harmonise usage references to show / list option Mark Einon
  2015-03-24 21:49 ` [PATCH iproute2 1/2] ip: Make uniform the use of synonyms list, show and lst Stephen Hemminger
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Einon @ 2015-03-16  9:59 UTC (permalink / raw)
  To: stephen; +Cc: netdev, Mark Einon

Where used in the ip tool, the 'show' option always has the synonyms
'list' and 'lst', except for ip-token and ip-addrlabel, which are missing
'lst'. Add this as a synonym for these commands.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 ip/ipaddrlabel.c | 1 +
 ip/iptoken.c     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c
index b34dd8b..f6a638b 100644
--- a/ip/ipaddrlabel.c
+++ b/ip/ipaddrlabel.c
@@ -248,6 +248,7 @@ int do_ipaddrlabel(int argc, char **argv)
 	if (argc < 1) {
 		return ipaddrlabel_list(0, NULL);
 	} else if (matches(argv[0], "list") == 0 ||
+		   matches(argv[0], "lst") == 0 ||
 		   matches(argv[0], "show") == 0) {
 		return ipaddrlabel_list(argc-1, argv+1);
 	} else if (matches(argv[0], "add") == 0) {
diff --git a/ip/iptoken.c b/ip/iptoken.c
index 5689c2e..655f160 100644
--- a/ip/iptoken.c
+++ b/ip/iptoken.c
@@ -195,6 +195,7 @@ int do_iptoken(int argc, char **argv)
 	if (argc < 1) {
 		return iptoken_list(0, NULL);
 	} else if (matches(argv[0], "list") == 0 ||
+		   matches(argv[0], "lst") == 0 ||
 		   matches(argv[0], "show") == 0) {
 		return iptoken_list(argc - 1, argv + 1);
 	} else if (matches(argv[0], "set") == 0 ||
-- 
2.1.4

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

end of thread, other threads:[~2015-03-25  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16  9:59 [PATCH iproute2 1/2] ip: Make uniform the use of synonyms list, show and lst Mark Einon
2015-03-16  9:59 ` [PATCH iproute2 2/2] ip: Harmonise usage references to show / list option Mark Einon
2015-03-24 21:53   ` Stephen Hemminger
2015-03-25  9:26     ` Mark Einon
2015-03-24 21:49 ` [PATCH iproute2 1/2] ip: Make uniform the use of synonyms list, show and lst Stephen Hemminger

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