carloscuesta / gitmoji-cli

A gitmoji interactive cli tool for using emojis on commits. 💻
https://www.npmjs.com/package/gitmoji-cli
MIT License
4.62k stars 206 forks source link

Add shell completions for bash/zsh/fish/posh/etc #912

Open Freed-Wu opened 2 years ago

Freed-Wu commented 2 years ago

Description of the problem

❯ gitmoji -<TAB>
option
-c          Interactively commit using the prompts
--commit    Interactively commit using the prompts
--config    Setup gitmoji-cli preferences.
-g          Setup gitmoji-cli preferences.
-i          Initialize gitmoji as a commit hook
--init      Initialize gitmoji as a commit hook
--list      List all the available gitmojis
...

Solution

I guess in javascript there exists a library to generate shell completions automatically like

Alternatives

Don't use any library, like https://github.com/ytdl-org/youtube-dl/blob/master/devscripts or https://github.com/ogham/exa/tree/master/completions?

Additional context

No response

Validations

carloscuesta commented 2 years ago

Hey!

Thanks for opening the issue, indeed this would be a great improvement to the cli

Would you like to raise a Pull Request?

carloscuesta commented 1 year ago

Hey! Found this lib that can help implementing autocomplete:

https://github.com/f/omelette

Freed-Wu commented 1 year ago

Would you like to raise a Pull Request?

Sorry for late. I am not familiar with javascript now :cry: and if any one can do it I will be very grateful :smile: