Skip to content

Enhanced shell completion #493

Closed
Closed
@MichaelMure

Description

@MichaelMure

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliRelates to the CLIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions