noraj / haiti

:key: Hash type identifier (CLI & lib)
https://noraj.github.io/haiti/
MIT License
761 stars 55 forks source link

shell completion #128

Open noraj opened 1 year ago

noraj commented 1 year ago

generate shell / tab completion for the CLI tool

ideas:

pypas commented 1 year ago

Hey, can I work on this one?

noraj commented 1 year ago

@pypas Yes please, it would be greatly appreciated!

pypas commented 1 year ago

Hey @noraj sorry, after taking a look at it couldn't figure out a nice solution for this one

noraj commented 1 year ago

@pypas I understand, no worry, this is not an easy task.

noraj commented 1 year ago

I just found https://github.com/crdx/docopt-compgen and I am able to generate something with haiti --help | tail +3 | docopt-compgen but it would work only for bash.

https://github.com/Infinidat/infi.docopt_completion would certainly work too since the help message is quiet language agnostic but this one works also for zsh. However it seems a bit abandoned.