update exa preview style

This commit is contained in:
chenyc 2023-04-24 12:15:55 +08:00
parent 4685ea6adc
commit 7f060f5527
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
mime=$(file -bL --mime-type "$1") mime=$(file -bL --mime-type "$1")
category=${mime%%/*} category=${mime%%/*}
if [ -d "$1" ]; then if [ -d "$1" ]; then
exa -l --no-user --no-time --icons "$1" 2>/dev/null || ls --color=always "$1" 2>/dev/null || ls -G "$1" exa -l --no-user --no-time --icons --no-permissions --no-filesize "$1" 2>/dev/null || ls --color=always "$1" 2>/dev/null || ls -G "$1"
elif [ "$category" = text ]; then elif [ "$category" = text ]; then
(bat -p --color=always "$1" || cat "$1") 2>/dev/null | head -1000 (bat -p --color=always "$1" || cat "$1") 2>/dev/null | head -1000
elif [ "$category" = image ]; then elif [ "$category" = image ]; then