fix: 🐛 Fix copy keybind

Former-commit-id: c1666a4270
This commit is contained in:
Wenxuan Zhang 2019-05-30 18:22:18 +08:00
parent c193f18285
commit faad05c65a

View file

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