-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add initial support for easyrsa bash completion #409
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Please run this script through https://www.shellcheck.net/ |
Hello, Thanks for the link, I didn't knew that tool ! I made a first pass. There is still some warnings related to the way the $COMPREPLY array is built, but that's the usual method seen everywhere on bash completion scripts so I prefer keep it untouched. |
@eric-belhomme
Could you please add those to the script ? The patch to add these new options would also help to serve as documentation of how to do this in future. |
If you can support bash completion for EasyRSA then, please, feel free to reopen. Until then, closed as not planned. |
As soon as I closed this I changed my mind. Sorry for the noise. Re-opened as "would really like this but want help". I have put a lot of work into EasyRSA, so there were a lot of changes. Now that EasyRSA version 3.1 is stabilizing, bash-completion is a viable addition. "Volunteers" .... |
Hello,
The
easyrsa
CLI is powerful but a bit tricky to use as it support many arguments. Even worst, positional arguments matters !That's why a started to write a bash completion function to ease daily
easyrsa
usage.As I wonder this could be helpful for many others users I propose this PR.
To use it, just source easyrsa.completion from your ~/.bashrc:
source easyrsa3/easyrsa.completion
Then enjoy !
Eric