]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip: Make uniform the use of synonyms list, show and lst
authorMark Einon <mark.einon@gmail.com>
Mon, 16 Mar 2015 09:59:09 +0000 (09:59 +0000)
committerStephen Hemminger <shemming@brocade.com>
Tue, 24 Mar 2015 21:49:21 +0000 (14:49 -0700)
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
ip/iptoken.c

index b34dd8b14fb37d878223eaaf48b5970890619707..f6a638b5a07ca8eef758d2148a601b8ae677a97b 100644 (file)
@@ -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) {
index 5689c2ece58163a0a85bd6ab4184261170b47092..655f1601e89d1b25d7c04b9f31fb2f1a78ec682a 100644 (file)
@@ -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 ||