Skip to content

Add autocompletion, man page, and standard CLI flags#33

Open
arbourd wants to merge 2 commits intomainfrom
complete
Open

Add autocompletion, man page, and standard CLI flags#33
arbourd wants to merge 2 commits intomainfrom
complete

Conversation

@arbourd
Copy link
Copy Markdown
Owner

@arbourd arbourd commented May 7, 2026

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

@arbourd arbourd force-pushed the complete branch 3 times, most recently from 749dfc4 to a083292 Compare May 7, 2026 15:59
@arbourd arbourd changed the title feat: add autocompletion and standard CLI flags Add autocompletion, man page, and standard CLI flags May 7, 2026
@arbourd arbourd requested a review from Copilot May 7, 2026 16:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --complete mode; refactor main to be testable via injected args/stdout/stderr.
  • Implement repository path completion by walking GETPATH for .git directories, 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.

Comment thread get/complete.go
Comment thread get/complete.go
Comment thread completions/git-get.zsh
Comment thread README.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Comment thread main.go Outdated
Comment thread completions/git-get.zsh Outdated
Comment thread man/git-get.1
Comment thread get/complete.go
Comment thread .goreleaser.yml
Comment thread main_test.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Comment thread main.go
Comment thread man/git-get.1
Comment thread main_test.go Outdated
Comment thread main.go Outdated
Comment thread README.md
@arbourd arbourd force-pushed the complete branch 3 times, most recently from d1e73e4 to 8b11219 Compare May 7, 2026 20:42
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().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add autocompletion

2 participants