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:
@@ -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
|
||||
|
Reference in New Issue
Block a user