Closed
Description
Cobra, the library used to implement the CLI commands also generate the shell completion scripts, for bash, zsh, fish and powershell. This completion scripts are based on the description of each commands (living in https://github.com/MichaelMure/git-bug/tree/master/commands).
At the moment, those completion works decently, completing command names and flags. However it would be possible to do better. By teaching cobra (see https://github.com/spf13/cobra/blob/master/shell_completions.md#customizing-completions) about what is expected, it should be possible to:
- disable the default completion showing files when it's not appropriate
- complete based on git-bug specific terms (
git bug ls [tab][tab]
would also complete with query qualifiers) - complete based on git-bug specific data (
git bug show [tab][tab]
would complete with bug Ids, possibly with the bug title)