Skip to content

Shell completions support #877

Closed
@zefr0x

Description

@zefr0x

Summary 💡

What I mean is shell tab completions.

I think those shells should be supported taking priority into account:

  1. Bash
  2. Fish
  3. Zsh
  4. Elvish

Then maybe PowerShell for windows, but I don't think any one care 🙃.


I thought about using clap_complete to auto-generate completion scripts, but after a simple check in source code, we may need to make some changes that could have some complexity to generate them during build-time. However, for run-time this can be easily done, although some additional bloat have to be added to the binary to provide an option like --generate-completions in the CLI interface. It can be added as a feature for those who want to enable it before building the tool.

We may face a problem with auto-generation, like in git we may need dynamic completions, for example: display available branches or list of commits or staged files. clap_complete doesn't support dynamic completions as in clap-rs/clap#1232, but initially it may not be important for gix.

Motivation 🔦

It will make using gix easy and more productive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions