1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-06 11:33:14 +03:00

lvconvert: restrict command matching for no option variant

The 'lvconvert LV' command def has caused multiple problems
for command matching because it matches the required options
of any lvconvert command.  Any lvconvert with incorrect options
ends up matching 'lvconvert LV', which then produces an error
about incorrect options being used for 'lvconvert LV'.  This
prevents suggestions from nearest-command partial command matches.

Add a special case for 'lvconvert LV' so that it won't be used
as a partial match for a command that has options specified.
This commit is contained in:
David Teigland
2018-07-23 11:08:12 -05:00
parent 63ec42f428
commit 8a66c81b9b
3 changed files with 16 additions and 1 deletions

View File

@@ -95,6 +95,7 @@ struct cmd_context {
char **argv;
struct arg_values *opt_arg_values;
struct dm_list arg_value_groups;
int opt_count; /* total number of options (beginning with - or --) */
/*
* Position args remaining after command name