VirtualBox

Changeset 37172 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 20, 2011 5:15:55 PM (14 years ago)
Author:
vboxsync
Message:

VBoxManage: help commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r37101 r37172  
    471471        }
    472472        if (!s_commandHandlers[commandIndex].command)
    473             rcExit = errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(argv[iCmd]).c_str());
     473        {
     474            /* Help topics. */
     475            if (fShowHelp && !strcmp(argv[iCmd], "commands"))
     476            {
     477                RTPrintf("commands:\n");
     478                for (unsigned i = 0; i < RT_ELEMENTS(s_commandHandlers) - 1; i++)
     479                    if (   i ==  0  /* skip backwards compatibility entries */
     480                        || s_commandHandlers[i].help != s_commandHandlers[i - 1].help)
     481                        RTPrintf("    %s\n", s_commandHandlers[i].command);
     482            }
     483            else
     484                rcExit = errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(argv[iCmd]).c_str());
     485        }
    474486
    475487        /* Although all handlers should always close the session if they open it,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette