1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

commands: suggest --help if command doesn't match

This commit is contained in:
David Teigland 2017-02-13 13:46:17 -06:00
parent 698abdde16
commit b2fd5b31d3

View File

@ -1542,6 +1542,7 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path,
if (!best_required) {
/* cmd did not have all the required opt/pos args of any command */
log_error("Failed to find a matching command definition.");
log_error("Run '%s --help' for more information.", name);
if (close_ro) {
log_warn("Closest command usage is:");
print_usage(&_cmdline.commands[close_i]);