Add colorized output to files command
This commit is contained in:
parent
80ee840fa0
commit
4d19b1b8a9
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
[ "$1" ] && commit_hash="$1" || commit_hash="HEAD"
|
[ "$1" ] && commit_hash="$1" || commit_hash="HEAD"
|
||||||
|
|
||||||
commit="git --no-pager show -q $commit_hash"
|
commit="git --no-pager log --color=always -n 1 $commit_hash"
|
||||||
limiter="seq -s_ 150|tr -d '[:digit:]'"
|
delimiter="seq -s_ 150 | tr -d '[:digit:]'"
|
||||||
file_content="git show $commit_hash:{}"
|
file_content="git show $commit_hash:{}"
|
||||||
|
pager="bat --style numbers --decorations always --file-name {}"
|
||||||
|
|
||||||
git ls-tree -r --name-only "$commit_hash" |
|
git ls-tree -r --name-only "$commit_hash" |
|
||||||
fzf --ansi --preview "$commit && $limiter && $file_content" \
|
fzf --ansi --preview "$commit && $delimiter && $file_content | $pager" \
|
||||||
--preview-window=right:70%
|
--preview-window=right:70%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user