Binds for previes scroll.
This commit is contained in:
parent
dc49b3370f
commit
e196a2a724
@ -18,7 +18,7 @@ gl() {
|
|||||||
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*")
|
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*")
|
||||||
cmd="echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | cat"
|
cmd="echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | cat"
|
||||||
g=(git log --graph --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' --color=always "$@")
|
g=(git log --graph --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' --color=always "$@")
|
||||||
fzf=(fzf --ansi --reverse --tiebreak=index --no-sort --bind='ctrl-j:preview-up' --bind='ctrl-k:preview-down' --bind="ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |pbcopy)" --bind="enter:execute($cmd | LESS='-r' less)" --preview 'f() { set -- $(echo -- "$@" | grep -o "[a-f0-9]\{7\}"); [ $# -eq 0 ] || git show --color=always $1; }; f {}')
|
fzf=(fzf --ansi --reverse --tiebreak=index --no-sort --bind='k:preview-up' --bind='j:preview-down' --bind="ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |pbcopy)" --bind="enter:execute($cmd | LESS='-r' less)" --preview 'f() { set -- $(echo -- "$@" | grep -o "[a-f0-9]\{7\}"); [ $# -eq 0 ] || git show --color=always $1; }; f {}')
|
||||||
$g | $fzf
|
$g | $fzf
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user