#5314·multipass

Bash completion prints errors from internal commands into the prompt

Author: ricabCreated Sep 25, 2026Updated Sep 25, 2026
LabelsjiraCLIshell completion

Describe the bug Not all internal calls to multipass in bash completion have stderr redirected. When there is an error, it is spliced onto the terminal, at the cursor's position, making everything look garbled. This is more apparent with the new deprecation warnings (on macOS).

In this example, I hit tab right after "up" and the rest of the text appeared:

$ multipass start up*** Warning! The qemu driver is deprecated and will be removed in an upcoming release. ***

We recommend switching to the new hyperv_api driver as soon as possible (multipass set local.driver=hyperv_api). Your instances will not be destroyed but they will be unreachable from the new driver. You can switch back to the old driver for now, but you will need to manually recreate any instances you want to keep in the next release.

*** Warning! The qemu driver is deprecated and will be removed in an upcoming release. ***

We recommend switching to the new hyperv_api driver as soon as possible (multipass set local.driver=hyperv_api). Your instances will not be destroyed but they will be unreachable from the new driver. You can switch back to the old driver for now, but you will need to manually recreate any instances you want to keep in the next release.

lifting-avocet ^C

Ignore the hyperv_api text, it would not actually be issued on Linux. I hacked the daemon to cause it to produce it.

To Reproduce

  1. If using the snap, first source the completion script: <repo_root>/completions/bash/multipass to use it directly instead of snapd's own completion wrapper (which does throw away stderr).
  2. Make the internal commands fail, e.g. stop the daemon (snap stop multipassd)
  3. Type multipass start and press Tab
  4. Observe the error from multipass list getting appended to the prompt

Expected behavior Completion silently offers no candidates. Errors should only be shown when the user actually runs a command.