|
|
@@ -133,8 +133,9 @@ if [ -x /usr/bin/fzf ]; then
|
|
|
|
|
|
__fzf_git_commit_sha() {
|
|
|
setopt localoptions pipefail no_aliases 2> /dev/null
|
|
|
- git log --graph --color=always -n 50 --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' |
|
|
|
- FZF_DEFAULT_OPTS="--ansi --no-sort --tiebreak=index --height ${FZF_TMUX_HEIGHT:-40%} --reverse ${FZF_DEFAULT_OPTS-}" $(__fzfcmd) -m "$@" |
|
|
|
+ git log --color=always -n 50 --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' |
|
|
|
+ FZF_DEFAULT_OPTS="--ansi --no-sort --tiebreak=index --reverse \
|
|
|
+ --preview 'git show --color=always {1}' ${FZF_DEFAULT_OPTS-}" $(__fzfcmd) -m "$@" |
|
|
|
sed -r -e 's/([0-9a-f]+) .+/\1/' -e 's/.+ ([0-9a-f]+)/\1/'
|
|
|
}
|
|
|
fzf-git-commit-sha-widget() {
|