Suppose my cli has two subcommands, sub1 and sub2. sub1 has an option -o that requires a value. This option has an autocomplete function assigned to it.
When I enter
$ cli sub1 -o <tab><tab>
autocomplete not only suggests my allowed values for -o, but also sub2. However, since an option value is required after -o, sub2 is an invalid suggestion at this point.
The same happens with required arguments.
Is there a possibility to suppress autocompletion of subcommands while still in the context of required arguments or options?
Python version is Python 3.5.2 :: Anaconda 4.2.0 (64-bit) and Click version is 7.0-dev.
Suppose my
clihas two subcommands,sub1andsub2.sub1has an option-othat requires a value. This option has an autocomplete function assigned to it.When I enter
$ cli sub1 -o <tab><tab>autocomplete not only suggests my allowed values for
-o, but alsosub2. However, since an option value is required after-o,sub2is an invalid suggestion at this point.The same happens with required arguments.
Is there a possibility to suppress autocompletion of subcommands while still in the context of required arguments or options?
Python version is
Python 3.5.2 :: Anaconda 4.2.0 (64-bit)and Click version is7.0-dev.