Fish started shipping git completions in the binary with 4.2.0 and deprecated the old completion
files with 4.8.0.
Update forgit’s fish completion loader to support both models:
* prefer `status get-file completions/git.fish` (binary-embedded completions)
* fall back to `$__fish_data_dir/completions/git.fish` (completion files)
Also refactors loading into a helper function to allow early returns and reduce nesting.
Add `gwa` command for interactively creating git worktrees with
fzf-powered branch selection.
Usage:
- `gwa`: select a branch to create a worktree for
- `gwa <new-branch>`: create a new branch from a selected base branch
- 2+ args: fall back to `git worktree add` directly
New worktrees are created under `$FORGIT_WORKTREE_ADD_DIR` (defaults to
`<repo-root>/.wt/`) and the shell automatically cd's into the result.
Add worktree browser (gwt) and worktree delete selector (gwd) with:
- Interactive worktree list with lock status, branch info, and age
- Preview showing working tree status and recent commits
- Ctrl-Y to copy worktree path, Alt-L to toggle lock/unlock
- Shell integration for zsh (with cd) and fish (with cd)
- Tab completions for zsh, bash, and fish
- Documentation in README with keybindings and options
Co-Authored-By: Sufien Tout <sufientout@gmail.com>
Introducing `show` as a new subcommand of `forgit`, an interactive
version of `git show`. The configured default alias is `gso`.
Alt-T can be used to toggle between showing the diff and the commit
message in the fzf preview window.
The new command in used instead of `forgit diff` when pressing enter
in `forgit log`. This fixes the display of diffs for merge commits.
**Note**: we have a requirement for the `fzf` version now. The minimum
required `fzf` version is 0.49.0. If the installed version is lower,
forgit will exit with an error message.
Fixes#416.
fish's builtin git completion automatically registers git-forgit completions as completions for forgit subcommand of git. Therefore this PR provides completions for both formats git-forgit and git forgit.
Simple subcommands get the completion list from __fish_git_* functions, while others requiring more than 1 __fish_git_* completion sources reuse the completion items from the corresponding git commands.