terramate-io / terramate

Terramate CLI is an open-source Infrastructure as Code (IaC) Orchestration and Code Generation tool for Terraform, OpenTofu and Terragrunt.
https://terramate.io
Mozilla Public License 2.0
3.11k stars 84 forks source link

[BUG] `terramate install-completions` on fish tries to complete with descriptions and whitespace #1739

Open ehakan opened 4 weeks ago

ehakan commented 4 weeks ago

Describe the bug The tab completions on fish shell don't just select the command, they include command descriptions as well, including whitespaces.

It does work properly if I type out a section an command first. Type terramate cre and then press TAB, it completes create properly.

But typing just terramate <space> and then pressing TAB tries to pick descriptions.

After pressing tab: image

After selection an option with the arrow keys: image

image

To Reproduce:

  1. Run terramate install-completions on fish shell
  2. Type terramate<space><tab>
    • The options are already a bit garbled at this point
  3. Use the arrow keys to select an option
    • Now the description appears in the prompt

Expected behavior Fish completed descriptions normally appear like this: image

Log Output Add logs from Terramate to help debug your problem.

Environment (please complete the following information):

i4ki commented 3 weeks ago

Hi @ehakan

Yes, I'm not a fish user but I installed here and reproduced the same behavior. We depend on a library for these completions and we will have to report it upstream, maybe fork and fix ourselves.

Thanks for reporting this!