Revert b370e46b370e46... Put longest options first
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 7f1620223f9f7083712f9882bf38fb3089b24e18..f503916de528852135936fb2435543468ed5b256 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -502,6 +502,9 @@ static void show_option_help(struct fio_option *o)
                "no argument (opt)",
        };
 
+       if (o->alias)
+               printf("%20s: %s\n", "alias", o->alias);
+
        printf("%20s: %s\n", "type", typehelp[o->type]);
        printf("%20s: %s\n", "default", o->def ? o->def : "no default");
        show_option_range(o);
@@ -524,7 +527,8 @@ int show_cmd_help(struct fio_option *options, const char *name)
                int match = 0;
 
                if (name) {
-                       if (!strcmp(name, o->name))
+                       if (!strcmp(name, o->name) ||
+                           (o->alias && !strcmp(name, o->alias)))
                                match = 1;
                        else {
                                unsigned int dist;