Created
September 17, 2019 23:37
-
-
Save brennie/b22748960b98c7697463325b1a7e07e9 to your computer and use it in GitHub Desktop.
git fzf keybinds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/fish/functions/fish_user_key_bindings.fish | |
function __fzf_git_tags | |
if [ ! git rev-parse HEAD >/dev/null 2>&1 ] | |
return | |
end | |
git tag --sort -version:refname | \ | |
fzf-tmux --multi --preview-window right:70% \ | |
--preview 'git show --color=always {} | head -'$LINES | |
end | |
function fish_user_key_bindings | |
bind \cg\ct 'commandline --insert (__fzf_git_tags)' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment