ip: Make uniform the use of synonyms list, show and lst
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>
This commit is contained in:
parent
4612d04d6b
commit
473544d96d
|
|
@ -248,6 +248,7 @@ int do_ipaddrlabel(int argc, char **argv)
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
return ipaddrlabel_list(0, NULL);
|
return ipaddrlabel_list(0, NULL);
|
||||||
} else if (matches(argv[0], "list") == 0 ||
|
} else if (matches(argv[0], "list") == 0 ||
|
||||||
|
matches(argv[0], "lst") == 0 ||
|
||||||
matches(argv[0], "show") == 0) {
|
matches(argv[0], "show") == 0) {
|
||||||
return ipaddrlabel_list(argc-1, argv+1);
|
return ipaddrlabel_list(argc-1, argv+1);
|
||||||
} else if (matches(argv[0], "add") == 0) {
|
} else if (matches(argv[0], "add") == 0) {
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@ int do_iptoken(int argc, char **argv)
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
return iptoken_list(0, NULL);
|
return iptoken_list(0, NULL);
|
||||||
} else if (matches(argv[0], "list") == 0 ||
|
} else if (matches(argv[0], "list") == 0 ||
|
||||||
|
matches(argv[0], "lst") == 0 ||
|
||||||
matches(argv[0], "show") == 0) {
|
matches(argv[0], "show") == 0) {
|
||||||
return iptoken_list(argc - 1, argv + 1);
|
return iptoken_list(argc - 1, argv + 1);
|
||||||
} else if (matches(argv[0], "set") == 0 ||
|
} else if (matches(argv[0], "set") == 0 ||
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue