diff --git a/guzzy/commands/files.sh b/guzzy/commands/files.sh index 9cbc5f3..727d60b 100755 --- a/guzzy/commands/files.sh +++ b/guzzy/commands/files.sh @@ -2,10 +2,11 @@ [ "$1" ] && commit_hash="$1" || commit_hash="HEAD" -commit="git --no-pager show -q $commit_hash" -limiter="seq -s_ 150|tr -d '[:digit:]'" +commit="git --no-pager log --color=always -n 1 $commit_hash" +delimiter="seq -s_ 150 | tr -d '[:digit:]'" file_content="git show $commit_hash:{}" +pager="bat --style numbers --decorations always --file-name {}" 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%