mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-04 15:45:22 +00:00
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.
This commit is contained in:
parent
97030d4cb1
commit
fe3a9c603e
@ -14,7 +14,7 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
file=${1/#\~\//$HOME/}
|
file=${1/#\~\//$HOME/}
|
||||||
type=$(file --dereference --mime -- "$file")
|
type=$(file --brief --dereference --mime -- "$file")
|
||||||
|
|
||||||
if [[ ! $type =~ image/ ]]; then
|
if [[ ! $type =~ image/ ]]; then
|
||||||
if [[ $type =~ =binary ]]; then
|
if [[ $type =~ =binary ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user