Skip to content

Instantly share code, notes, and snippets.

@dkao1978
Created November 11, 2017 23:19
Show Gist options
  • Save dkao1978/ce2619b7bd5eabfbe2c5e0cd6f8e7023 to your computer and use it in GitHub Desktop.
Save dkao1978/ce2619b7bd5eabfbe2c5e0cd6f8e7023 to your computer and use it in GitHub Desktop.
bind-git-helper() {
local char
for c in $@; do
echo -n "${(@)}"
eval "fzf-g$c-widget() { local result=\$(h$c | join-lines); zle reset-prompt; LBUFFER+=\$result }"
eval "zle -N fzf-g$c-widget"
eval "bindkey '^g^$c' fzf-g$c-widget"
done
}
bind-git-helper f b t r h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment