finch
finch copied to clipboard
Finch autocompletion doesnt pick up subcommands
Describe the bug The Finch CLI's auto completion today does not work as expected as the majority of sub commands / flags are not known by the Finch CLI. This is because today the majority of sub commands and flags are owned by nerdctl not finch.
Steps to reproduce Top level commands are available with auto completion:
$ finch [tab][tab]
build container help inspect logs pull run system version
builder cp history kill network push save tag vm
commit create image load pause restart start top volume
completion events images login port rm stats unpause wait
compose exec info logout ps rmi stop update
However sub commands and flags are not
$ finch compose [tab][tab]
.
$ finch compose - [tab][tab]
--debug --help -h
With the exception of VM level sub commands, which are first class citizens in the Finch CLI
$ finch vm [tab][tab]
init remove start status stop
$ finch vm remove - [tab][tab]
--debug --force --help
Expected behavior Auto completion to work for all sub commands and flags.
Additional context
In the interim, should we disable auto completion in Finch?
https://github.com/spf13/cobra/blob/main/shell_completions.md#adapting-the-default-completion-command