Conversation
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 1 new, 2 changed, 0 removedBuild ID: fe56d79e2e787cff8f45a6ec URL: https://www.apollographql.com/docs/deploy-preview/fe56d79e2e787cff8f45a6ec |
| } | ||
|
|
||
| #[test] | ||
| fn it_generates_zsh_completion() { |
There was a problem hiding this comment.
Kinda hard to test this for real automatically—have you manually tested with both bash and zsh?
There was a problem hiding this comment.
I updated the test to at least validate the output is valid bash and zsh scripts.
|
For updating later: Homebrew Formula Update for Shell CompletionsThis document describes the changes needed to the Homebrew formula to automatically install bash and zsh completion scripts when Rover is installed via Homebrew. Formula LocationThe Rover Homebrew formula is maintained at: Required ChangesUpdate the def install
# Ensure that the `openssl` crate picks up the intended library.
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
ENV["OPENSSL_NO_VENDOR"] = "1"
system "cargo", "install", *std_cargo_args
# Generate and install bash completion
bash_completion.install Utils.safe_popen_read(bin/"rover", "completion", "bash")
# Generate and install zsh completion
zsh_completion.install Utils.safe_popen_read(bin/"rover", "completion", "zsh")
endExplanation
TestingAfter updating the formula:
Notes
|
|
@smyrick there are conflicts on Cargo.lock, can you update? |
263653e to
09c6f73
Compare
f9badca to
0dbda49
Compare


This pull request introduces shell completion support for Rover, allowing users to generate bash and zsh completion scripts via new commands. It adds the necessary implementation, updates dependencies, and provides integration tests and documentation for Homebrew formula updates. These changes improve the user experience by enabling tab completion for Rover commands in bash and zsh shells.
This was created with Cursor AI. I am not a Rust expert but the code seems reasonable to me. Please provide more feedback that necessary.
Shell Completion Feature
rover completion bashandrover completion zshcommands, which generate shell completion scripts for bash and zsh, respectively, using theclap_completecrate. [1] [2] [3] [4]Dependency Updates
clap_completeas a dependency in both the main and workspace sections ofCargo.tomlto support shell completion generation. [1] [2]Testing
rover completion bashandrover completion zshcommands generate the expected completion scripts. [1] [2]Documentation
HOMEBREW_FORMULA_UPDATE.mdfile detailing the changes required to the Homebrew formula for automatic installation of completion scripts.Changelog
CHANGELOG.mdto document the addition of shell completion support for bash and zsh.