Add ctrl-y keybinding on forgit::log.

This commit is contained in:
Wenxuan 2018-07-20 15:39:50 +08:00
parent 72fc7f4c51
commit 43522b9ace

View file

@ -59,6 +59,7 @@ forgit::log() {
eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $@ $forgit_emojify" |
forgit::fzf +s +m --tiebreak=index \
--bind="enter:execute($cmd |LESS='-R' less)" \
--bind="ctrl-y:execute-silent(echo {} |grep -o '[a-f0-9]\{7\}' |pbcopy)+abort" \
--preview="$cmd"
}