Skip to content

[Feature request] Add shell command completion autogeneration #537

@yermulnik

Description

@yermulnik

fswitch already has around a dozen+ of command line arguments which is complicate to remember and operate by humans when necessary.
Would be great to look up and employ a Golang library to autogenerate shell command completions from code on the fly (e.g. tswitch --completion bash) that can be soaked into shell dynamically (e.g. . <(tfswitch --completion bash)).

Common shells that shell command completion is shipped for usually are: Bash, Zsh, Fish, PowerShell.

Once implemented, update documentation with manual steps and Homebrew formulae to autogenerate and install shell command completions into common location.
Caveat: only @warrensbox has write access to https://github.com/warrensbox/homebrew-tap

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

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRefactor existing code for better performance and quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions