Commit graph

19 commits

Author SHA1 Message Date
sandroid 3dbcacd3f2
feat: add interactive git restore selector (#537)
Co-authored-by: Javier Tia <floss@jetm.me>
2026-06-16 21:16:26 +02:00
sandr01d dfe682e113
ci: enforce consistent shell formatting with shfmt (#514) 2026-04-11 17:51:34 +02:00
sandroid 12ec178093 feat: add interactive checkout file from commit selector
closes #476
2026-03-17 17:21:28 +01:00
Wenxuan Zhang 7f9ea3a4b1 feat: add interactive worktree add command (gwa)
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.
2026-03-12 10:07:34 +08:00
Wenxuan Zhang d62a34d0f7 fix: use git-switch native completion for switch_branch
Use _git_switch/_git-switch instead of _git_checkout_branch/_git-branches
to stay closer to git's own completion suggestions.
2026-03-11 09:10:17 +08:00
Wenxuan Zhang 4c60265e4f fix: review comments
- stash_push: use _git_add instead of _git_stash for file path
  completion, consistent with zsh side
- switch_branch: use _git_checkout_branch instead of undefined
  _git_switch_branch
2026-03-11 09:10:17 +08:00
Wenxuan Zhang 5182bb459d feat: add missing entries for completion scripts
Several PUBLIC_COMMANDS (attributes, switch_branch, stash_push, ignore)
had no corresponding entries in the completion scripts, causing
incomplete tab completion.
2026-03-11 09:10:17 +08:00
Wenxuan Zhang 3b9ebce8bc refactor: extract _forgit_print_dim helper and improve worktree ops
- Extract dim formatting into _forgit_print_dim() to replace hardcoded
  ANSI sequences in _forgit_branch_list()
- Add empty state check and alt-l lock toggle reload for worktree delete
- Fix worktree path completion to handle paths with spaces using -z flag
- Add worktree command completion for bash and zsh
2026-03-10 09:20:16 +08:00
Wenxuan Zhang fc081846c0 feat: add interactive git worktree operations
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>
2026-03-10 09:20:16 +08:00
Iván Sotillo del Horno 3cd63a1bbe
Feature: add interactive git switch selector (#472) 2025-12-10 20:19:26 +01:00
sandroid 7c3aff1142 Feat: use git log completions for fixup commands 2025-07-16 20:36:10 +02:00
sandroid c9d047bf16 Fix: bash completions for reword 2025-07-16 20:36:10 +02:00
sandr01d 455e42ba64
Feature: add interactive reword selector (#443) 2025-05-29 20:51:12 +02:00
sandr01d c2b012855f
Feature: add interactive squash selector (#440) 2025-05-25 18:21:56 +02:00
carlfriedrich bb83b3cba0
Feature: add forgit show command (#417)
Some checks failed
ci / build (ubuntu-22.04) (push) Failing after 1s
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-20.04) (push) Has been cancelled
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.
2025-01-29 07:04:07 +01:00
Sufien Tout 7a40a11e79
Meta: add an .editorconfig and apply it to the codebase (#404)
Some checks failed
ci / build (ubuntu-22.04) (push) Failing after 0s
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-20.04) (push) Has been cancelled
2024-11-06 10:10:27 +01:00
sandr01d be82c47ceb
Feature: Add interactive git reflog (#398)
Some checks failed
ci / build (ubuntu-22.04) (push) Failing after 1s
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-20.04) (push) Has been cancelled
2024-09-04 22:02:27 +02:00
Tim aa85792ec4
Add bash completions for forgit functions and aliases (#275)
When using forgit via the shell plugin, source 'git-forgit.bash'
explicitly after 'forgit.plugin.zsh' to enable tab completion for forgit
shell functions and aliases.
2023-01-30 17:46:52 +01:00
Tim 73aea65778
Add bash completions for git-forgit (#235)
When using forgit as a subcommand of git, put 'git-forgit.bash' in one
of the following places and it will be loaded automatically on tab
completion of 'git forgit' or any configured git aliases of it:

- /usr/share/bash-completion/completions
- ~/.local/share/bash-completion/completions
2023-01-11 10:57:16 +01:00