Moved the completion definitions for zsh that previously were in completions/git-forgit.zsh and had to be sourced manually on shell startup into completions/_git-forgit, where they are automatically handled by compinit on shell startup. Sourcing a file to get completions is no longer necessary for zsh users.
If you're having issues after updating, and completions for commands such as `forgit::add` or aliases like `ga` aren't working, remove your completions cache (~/.zcompdump) and restart your shell.
Simplified _git-forgit to allow it to be called from within the completion script on the first run of a session.
---------
Co-authored-by: sandr01d <88739791+sandr01d@users.noreply.github.com>
Added more explicit instructions, now that I know how our brew installation process works.
While I was there, I moved AUR and Fig to be subheaders of Installation
* feat: add a keybind to open current file in default editor
---------
Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
Co-authored-by: sandr01d <88739791+sandr01d@users.noreply.github.com>
The git behavior within forgit can now be customized with a dedicated
variable for each forgit command, e.g. `FORGIT_ADD_GIT_OPTS` is passed
to the `git add` call within `ga`.
Also renaming `FORGIT_STASH_PUSH_OPTS` to `FORGIT_STASH_PUSH_FZF_OPTS`
and `FORGIT_REVERT_COMMIT_OPTS` to `FORGIT_REVERT_COMMIT_FZF_OPTS`
for consistency.
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.
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
A message can be passed via named argument (-m or --message). All other
arguments (e.g. file paths) will cause git stash push to be run directly without
invoking fzf.
The gcp (git cherry pick) command was the only command which did not
have a variable to set command-specific fzf options. Add the according
variable to source code and documentation.
* Adding support for git branch delete method in fish
* Add new doc to README
* Added options like gcb
* refactor: remove `--all` flag from gbd
* feat: sync forgit::branch::delete to bash and zsh
Co-authored-by: Wenxuan Zhang <wenxuangm@gmail.com>
* Add fixup function
Signed-off-by: Ariel Davidov <arik.davidov@gmail.com>
* refactor: more accurate editor
* refactor: support to fixup the first commit
Co-authored-by: Wenxuan Zhang <wenxuangm@gmail.com>