update filepreview.sh

This commit is contained in:
chenyc 2022-12-26 16:20:02 +08:00
parent 7cae90ca79
commit 1b08b0d85a
1 changed files with 1 additions and 1 deletions

View File

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