From 131f316b5c748c6d744c6678eedfd15bc7348f6d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 13 Jun 2018 09:37:51 +0200 Subject: [PATCH] cli: only show subcommand specific usage if command incomplete before: $ pveum acl ERROR: incomplete command 'pveum acl' USAGE: pveum [ARGS] [OPTIONS] pveum acl delete --roles [OPTIONS] pveum acl modify --roles [OPTIONS] pveum group add [OPTIONS] pveum group delete pveum group modify [OPTIONS] pveum role add [OPTIONS] pveum role delete pveum role modify --privs [OPTIONS] pveum user add [OPTIONS] pveum user delete pveum user modify [OPTIONS] pveum passwd pveum ticket [OPTIONS] pveum help [] [OPTIONS] after: $ pveum acl ERROR: incomplete command 'pveum acl' USAGE: pveum [ARGS] [OPTIONS] pveum acl delete --roles [OPTIONS] pveum acl modify --roles [OPTIONS] Signed-off-by: Thomas Lamprecht --- src/PVE/CLIHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 49a459b..489ff97 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -491,7 +491,7 @@ my $handle_cmd = sub { } # checked special commands, if def is still a hash we got an incomplete sub command - $abort->("incomplete command '$cmd_str'") if ref($def) eq 'HASH'; + $abort->("incomplete command '$cmd_str'", $args) if ref($def) eq 'HASH'; &$preparefunc() if $preparefunc; -- 2.39.2