-
Notifications
You must be signed in to change notification settings - Fork 280
Use bash parameter expansion. #1105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've updated this so it cleverly uses bash parameter expansion to conditionally include the current word and a space only if it starts with a hyphen.
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
✅ dopey
❌ Montana
You have signed the CLA already but the status is still pending? Let us recheck it.
CLAassistant
commented
Feb 8, 2024
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Hey @Montana 👋. Thanks for submitting the PR! I'm really sorry it's taken so long for me to get around to testing :[
That said, I have tested on my local and I'm not sure it's working as intended. When I type step ca provisioner (no space at the end) and then hit <tab><tab> I get garbled output. I'm just using step ca provisioner as an example here, because this happens with any command.
If I try the same thing with the existing bash_completion script I get the intended output (listing the currently available commands - in this case just provisioner, since I haven't completed that word).
Let me know if I'm doing something wrong. As my username reflects, I can be pretty thick skulled at times.
I've updated this so it cleverly uses bash parameter expansion to conditionally include the current word and a space only if it starts with a hyphen.