From fe3a9c603e924425f80b87d76adb3e80d2bc668c Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 25 Dec 2024 21:58:10 -0800 Subject: [PATCH] fzf-preview.sh: Don't include the file name in type information (#4143) Reduce the changes of misjudging the type, e.g., when file is under an `image/` directory. --- bin/fzf-preview.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fzf-preview.sh b/bin/fzf-preview.sh index dd01784..ecec41a 100755 --- a/bin/fzf-preview.sh +++ b/bin/fzf-preview.sh @@ -14,7 +14,7 @@ if [[ $# -ne 1 ]]; then fi file=${1/#\~\//$HOME/} -type=$(file --dereference --mime -- "$file") +type=$(file --brief --dereference --mime -- "$file") if [[ ! $type =~ image/ ]]; then if [[ $type =~ =binary ]]; then