Conversation
749dfc4 to
a083292
Compare
There was a problem hiding this comment.
Pull request overview
Adds user-facing CLI ergonomics to git-get by introducing shell completion support, standard --help/--version flags, a man page, and build-time version stamping so distributed binaries report meaningful versions.
Changes:
- Add
--help,--version, and an internal--completemode; refactormainto be testable via injected args/stdout/stderr. - Implement repository path completion by walking GETPATH for
.gitdirectories, plus new completion scripts for Bash/Zsh/Fish/PowerShell. - Add a man page and wire release/CI tooling to stamp versions and ship man/completion artifacts.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents autocompletion installation steps. |
| man/git-get.1 | Introduces a man page for the CLI. |
| main.go | Adds help/version/complete flags, version var, and refactors execution flow. |
| main_test.go | Adds tests for the new CLI flag behaviors and completion plumbing. |
| get/complete.go | Adds GETPATH-walking completion implementation. |
| get/complete_test.go | Adds unit tests for completion matching behavior. |
| completions/git-get.bash | Bash completion script using --complete. |
| completions/git-get.zsh | Zsh completion script using --complete. |
| completions/git-get.fish | Fish completion script using --complete. |
| completions/git-get.ps1 | PowerShell argument completer using --complete. |
| .goreleaser.yml | Stamps version via ldflags; packages man/completions; adds Homebrew metadata. |
| .github/workflows/ci.yml | Stamps version in CI builds via ldflags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d1e73e4 to
8b11219
Compare
Adds tab completion by walking GETPATH for .git directories via --complete, with scripts for Bash, Zsh, Fish, and PowerShell. Adds --help and --version flags, a man page, and wires version stamping via ldflags in CI and GoReleaser.
Rename Path() to AbsolutePath() and change its role to read-only. Add ShortPath() used in CLI usage output. Move os.MkdirAll calls to get.Clone().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tab completion by walking GETPATH for .git directories via --complete, with scripts for Bash, Zsh, Fish, and PowerShell.
Adds --help and --version flags, a man page, and wires version stamping via ldflags in CI and GoReleaser.
Closes #14