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:
Mark Einon 2015-03-16 09:59:09 +00:00 committed by Stephen Hemminger
parent 4612d04d6b
commit 473544d96d
2 changed files with 2 additions and 0 deletions

View 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) {

View 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 ||