summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHong Xu <hong@topbug.net>2024-12-25 21:58:10 -0800
committerGitHub <noreply@github.com>2024-12-26 14:58:10 +0900
commitfe3a9c603e924425f80b87d76adb3e80d2bc668c (patch)
treec8eee16a7dc32bed19e5fc6cf57a3a05f356c031 /bin
parent97030d4cb10d9b1c51f2afd60e14c6e46a7fe4ba (diff)
downloadfzf-fe3a9c603e924425f80b87d76adb3e80d2bc668c.tar.gz
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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fzf-preview.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/fzf-preview.sh b/bin/fzf-preview.sh
index dd017848..ecec41ae 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