Improve limiter in files command

This commit is contained in:
samedamci 2021-08-31 13:55:36 +02:00
parent 9a25dee96b
commit c4b8140948
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894

View File

@ -3,9 +3,9 @@
[ "$1" ] && commit_hash="$1" || commit_hash="HEAD"
commit="git --no-pager show -q $commit_hash"
limiter="-------------------------------------------------"
limiter="seq -s_ 150|tr -d '[:digit:]'"
file_content="git show $commit_hash:{}"
git ls-tree -r --name-only "$commit_hash" |
fzf --ansi --preview "$commit && echo $limiter && $file_content" \
fzf --ansi --preview "$commit && $limiter && $file_content" \
--preview-window=right:70%