certstrap icon indicating copy to clipboard operation
certstrap copied to clipboard

Bash autocompletion

Open kerscher opened this issue 7 years ago • 5 comments

For interactive users, it would be useful to provide shell completion. GNU Bash is widespread and a good candidate for first implementation.

I can help by providing a PR, but would need to know if this is useful to spend time on or not. If so I’ll sign the CLA and send the request.

kerscher avatar Apr 06 '18 18:04 kerscher

Yeah, that'd nice. We could get it for free if we migrate to using kingpin for flags, I think.

csstaub avatar Apr 06 '18 18:04 csstaub

Would the bash_profile version where you have to eval $(certstrap --completion-script-bash) be acceptable? This avoids having to change any installation routines and affecting the user global state.

Reference: https://github.com/alecthomas/kingpin#bashzsh-shell-completion

kerscher avatar Apr 11 '18 11:04 kerscher

Migrating to kingpin seems like a medium-size change and not a simple addition of a bash script. Is this in the roadmap, just a general idea, or something one could possibly work in parallel and merge afterwards?

kerscher avatar Apr 11 '18 11:04 kerscher

I think migrating to kingpin is on our immediate short-term roadmap -- I was hoping to do it sometime this month. And then we get it for free.

All our other go command line tools use it, so it would make maintenance easier for us.

mcpherrinm avatar Apr 11 '18 19:04 mcpherrinm

I looked into this and the single dash multiple character flags ( -help vs --help ) are not supported in kingpin and would break backwards compatibility.

mweissbacher avatar Oct 23 '18 16:10 mweissbacher