Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Homebrew installation support for Scrut, including shell completion generation functionality. The changes enable users to install Scrut via Homebrew with automatic completion setup for Bash, Fish, PowerShell, and Zsh.
Changes:
- Added Homebrew formula with platform-specific binary installation for macOS and Linux
- Implemented shell completion generation using the
_SCRUT_COMPLETEenvironment variable - Updated documentation with Homebrew installation instructions and shell completion usage guide
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Formula/scrut.rb | New Homebrew formula that downloads pre-built binaries and generates shell completions during installation |
| src/bin/main.rs | Added completion generation logic triggered by _SCRUT_COMPLETE environment variable |
| website/docs/getting-started/installation.md | Updated installation docs with Homebrew instructions and shell completion guide |
| selftest/commands/completions.md | Added tests for shell completion functionality across Bash, Zsh, and Fish |
| Cargo.toml | Added clap_complete dependency and temporarily downgraded version to match released binaries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…sh completions Add test cases for PowerShell and Elvish shell completions to ensure they generate the expected completion scripts with subcommands. Add installation instructions showing how to configure completions in PowerShell profiles and Elvish rc.elv configuration files.
be21640 to
7972012
Compare
|
Updated to appease Copilot. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a71b99b to
b920649
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| end | ||
|
|
||
| test do | ||
| assert_match "scrut #{version}", shell_output("#{bin}/scrut --version") |
There was a problem hiding this comment.
The test assertion should include the 'v' prefix to match the actual version output format. According to the installation documentation (line 81 of installation.md), the version command outputs "scrut v0.X.Y" format, not "scrut 0.X.Y". The assertion should be changed to match "scrut v" followed by the version.
| assert_match "scrut #{version}", shell_output("#{bin}/scrut --version") | |
| assert_match "scrut v#{version}", shell_output("#{bin}/scrut --version") |
There was a problem hiding this comment.
In this case the docs are wrong, not the test.
There was a problem hiding this comment.
Your test is correct, the copilot is wrong.
There was a problem hiding this comment.
$ cargo build --release
# ...
$ target/release/scrut --version
scrut 0.4.3
|
@cboone Thanks for this again! I really, really want Homebrew support as well, so more than happy you did that. Two things:
|
|
If only we had proper stacked diffs! Thank you for your changes! |
Absolutely! Will do. |
|
Sorry, totally dropped the ball here! I'll get it sorted today. |
This replaces #44. This time it's built on #48, so as not to confuse Copilot unnecessarily. Once that PR is merged or closed, I'll clean this one up.
This time I had to temporarily downgrade the version in
Cargo.tomlso that it matches the names of the released binaries. Once you release updates, I can pull that commit out.My notes from last time: