-
Notifications
You must be signed in to change notification settings - Fork 7
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
Generate auto-completion in package build #65
Conversation
Thanks! Is there somewhere I can read about the |
I also only found out about it today by looking at zellij packaging: The hook is documented here: Btw: The CI failure does not seem related to my PR. |
Cool, thanks! And yeah just looks like coveralls gets turned off for external user-triggered CI, will need to fix eventually. Is there a way the CI can detect if the shell completions were installed correctly or not? Here's the test: Lines 60 to 79 in b87ad6c
|
Is this what you imagined? It uses expect to interactively start a bash shell and press Do you need fish and zsh too? (Though I don't use those so might have some trouble.) I tested the workflow locally with act and while I did get some weird errors and timeouts, they didn't seem related to my test, which ran successfully after some tinkering. |
Brilliant! bash is fine. This is perfect, nice work! |
Seems like the completion tests fail on Darwin. I'm happy to filter those tests if they aren't supposed to work, but if we expect them to work, I wonder what the issue is? |
I assumed that they would work. :/ My current theory is that the bootstrap script from Also, I noticed in this log that my test could actually succeed when it should not if enough files are added to the repository. Will fix that too. |
Ok it should now finally work. The issue was that macOS ships an ancient I also refactored and improved the test a bit with more debug switches and links to resources for people unfamiliar with expect since I also struggled with it. |
Very nice, thanks!! Will merge now. Hope you don't mind if I do a git squash so that it will be in conventional commit format, it makes things easier for the release CI to run. |
P.S., in case you prefer nixpkgs, I added |
PR MilesCranmer/rip2#65 has been merged
Thank you, I missed the comment before. I'll check it out and see if I can add the completions there too if still needed. |
Thanks for maintaining this fork.
I noticed that original
rip
does not offer completions and found your fork.I modified the package build a bit so that to completions are now generated at package build time and nix will take care that they are available in the standard location that the shell expects. This means that after installation the completions should work out of the box without additional setup/