lima-vm / lima

Linux virtual machines, with a focus on running containers
https://lima-vm.io/
Apache License 2.0
15.39k stars 604 forks source link

nerdctl.lima completions do not work on fish #2886

Open RafalSkolasinski opened 6 days ago

RafalSkolasinski commented 6 days ago

Description

Missing instructions (or I missed them, could be...) on how to enable fish completions for nerdctl.lima. I tried

nerdctl.lima completion fish > ~/.config/fish/completions/nerdctl.lima.fish

but unfortunately with no success.... probably because completions are generated for nerdctl and not nerdctl.lima.

afbjorklund commented 3 days ago

For the normal shells like bash, this is handled in the shell configuration itself and not in lima:

https://github.com/spf13/cobra/blob/main/site/content/completions/_index.md#aliases

There could be something similar available for fish

EDIT: seems to be called "wraps"

afbjorklund commented 3 days ago
> nerdctl completion fish | source
> complete -c nerdctl.lima -w nerdctl
RafalSkolasinski commented 3 days ago

Does not seem to work without having actual alias

alias nerdctl="nerdctl.lima"

and does not work very well as you type nerd<tab> and it first goes between nerdctl and nerdctl.lima...

I will keep trying...