canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.54k stars 635 forks source link

[cli] Tab completion for multipass: do not list generic options #3435

Open hartmutobendorf opened 4 months ago

hartmutobendorf commented 4 months ago

Describe the bug When using tab completion with the multipass CLI and bash, --verbose and --help are listed whenever a completion is asked for. This creates noise that makes it harder to find the relevant information.

To Reproduce How, and what happened?

  1. multipass start <TAB>
  2. --all --verbose logical-condor useful-apaca --verbose

Expected behavior --all logical-condor useful-apaca

georgeliao commented 4 months ago

Hi @hartmutobendorf

Thanks for the report.

Normally, the tab completion lists all possible options, because it is still a possibility that the user wants to tab-complete to the generic options like --help and --verbose. However, it is definitely less frequent than completing to other non-generic options, which in a way becomes "noise" as you mentioned. So a certain degree of precedence might improve the user experience.

We will definitely consider this.