rustup: add cargo completions; expand rustup completion shell support
- [x] Have you followed the guidelines for contributing?
- [x] Have you ensured that your commits follow the commit style guide?
- [x] Have you checked that there aren't other open pull requests for the same formula update/change?
- [x] Have you built your formula locally with
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting? - [x] Is your test running fine
brew test <formula>, where<formula>is the name of the formula you're submitting? - [ ] Does your build pass
brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?
- add rustup completion support for powershell and elvish
- add cargo completions to (upstream supported shells, namely,) bash and zsh
I tried using generate_completions_from_executable DSL but there's just no way (at least to my knowledge) to insert the shell argument in the middle of the command (which rustup requires, there's no workaround). Hence the brew audit --strict rustup failure.
rustup
* line 41, col 5: Use `generate_completions_from_executable` DSL instead of `(bash_completion/"cargo").write Utils.safe_popen_read(bin/"rustup", "completions", "bash", "cargo")`.
* line 42, col 5: Use `generate_completions_from_executable` DSL instead of `(zsh_completion/"_cargo").write Utils.safe_popen_read(bin/"rustup", "completions", "zsh", "cargo")`.
Error: 2 problems in 1 formula detected.
Thanks for contributing to Homebrew! :tada: It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.
hm... it seems that there cannot be two generate_completions_from_executable in a formula for now.
Yeah... I tried [almost] everything I can think of. I hoped the DSL set $SHELL but it doesn't and the $ gets escaped anyway in the final command. #13536(comment) should've been implemented IMO. And Elvish support is missing too. All in all, the DSL needs updating.
If I'm not mistaken, not using the DSL is a style error, right? If yes then, should it really be a blocker...?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.