-
Notifications
You must be signed in to change notification settings - Fork 217
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
Bash completion for spreaper #359
Conversation
@joaquincasares are you any good at knowing how, and testing, that the bash completion script gets installed into the correct location during binary install. |
@michaelsembwever what gets outputted here is pretty bad, but it works for basic use cases. https://github.com/joaquincasares/python-bashcomplete I remember it being slightly buggy in complicated use cases, but the outputted file should be enough to get you up and running. Once you try to customize it you'll quickly realize where the shortfalls are. Sadly, all I know is what I programmed into this repo and that was after quite a bit of time trying to learn it all. The syntax is what killed me the most! :p I just now realized you already had a commit and that looks far better than what my code generates! As far as testing, try: Upon install, I believe this is the ideal place: Source: https://www.howtoforge.com/how-to-add-bash-completion-in-debian |
Yeah, I wrote that by hand, and it looks up autocompletion by making itself |
Oh, good catch. Yup, Your code looks great though! As best as I can tell. :) |
5227394
to
6336510
Compare
@internetstaff have any input on this PR? |
lgtm from an rhel packaging perspective, but I can't test it yet Thanks for knocking this out - it was on my wishlist / todo! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the package on Ubuntu after fixing the Makefile and completion works as expected there.
Great addition!
src/packaging/Makefile
Outdated
@@ -20,6 +20,7 @@ prepare: | |||
cp resource/cassandra-reaper*.yaml build/etc/cassandra-reaper/configs | |||
cp ../server/target/cassandra-reaper-$(VERSION).jar build/usr/share/cassandra-reaper/ | |||
cp bin/* build/usr/local/bin/ | |||
cp etc/bash_completion.d/spreaper build/etc/bash_completion.d/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add this line before running that command : mkdir -p build/etc/bash_completion.d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. thanks. ps don't we have any tests for this?
6336510
to
3b9e1d7
Compare
3b9e1d7
to
750a850
Compare
No description provided.