parent
4bc0323b48
commit
9867a4ac3c
@ -1,16 +1,35 @@
|
||||
fzf-git.sh
|
||||
==========
|
||||
|
||||
bash and zsh key bindings for Git objects, powered by fzf.
|
||||
bash and zsh key bindings for Git objects, powered by [fzf][fzf].
|
||||
|
||||
[fzf]: https://github.com/junegunn/fzf
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Source [fzf-git.sh](fzf-git.sh) file in from your .bashrc or .zshrc.
|
||||
1. Install the latest version of [fzf][fzf]
|
||||
2. Source [fzf-git.sh](fzf-git.sh) file from your .bashrc or .zshrc.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-F</kbd> for **F**iles
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-B</kbd> for **B**ranches
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-T</kbd> for **T**ags
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-R</kbd> for **R**emotes
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-H</kbd> for commit **H**ashes
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-S</kbd> for **S**tashes
|
||||
|
||||
Customization
|
||||
-------------
|
||||
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-F</kbd> for files
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-B</kbd> for branches
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-T</kbd> for tags
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-R</kbd> for remotes
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-H</kbd> for commit hashes
|
||||
* <kbd>CTRL-G</kbd><kbd>CTRL-S</kbd> for stashes
|
||||
```sh
|
||||
# Redefine this function to change the options
|
||||
_fzf_git_fzf() {
|
||||
fzf-tmux -p80%,60% -- \
|
||||
--layout=reverse --multi --height=50% --min-height=20 --border \
|
||||
--preview-window='right,50%,border-left' \
|
||||
--bind='ctrl-/:change-preview-window(down,50%,border-top|hidden|)' "$@"
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in new issue