canonical / canonical/multipass

Bash completion suggests multiple instances for single-instance commands

Open
#3,258 0 comments 0 reactions 0 assignees View on GitHub
CLI shell completion
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 1h
Merged PRs (30d)
44

Description

```
$ multipass shell [TAB][TAB]
aspirant-ermine --help luscious-elf --verbose
$ multipass shell aspirant-ermine [TAB]
--help luscious-elf --verbose
```
But shell only accepts one instance... Other commands are affected too.

**Expected behavior**
No instances would be suggested after the first free argument. In `shell` or `snapshot`, free arguments could be identified by whether or not they start with a dash. In `exec` or `mount`, it is a little trickier.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Bash completion behavior for the shell, snapshot, exec, and mount commands, then reproduce the examples with multipass shell. Done means completion stops suggesting instance names after the first free argument while preserving appropriate options and handling the trickier exec and mount cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.