mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 04:34:26 +08:00
Fix preview of symbolic links (#739)
This commit is contained in:
committed by
Junegunn Choi
parent
7bf940d261
commit
9b50e2fd5f
@@ -33,7 +33,7 @@ unless File.readable? path
|
||||
exit 1
|
||||
end
|
||||
|
||||
if `file --mime "#{file}"` =~ /binary/
|
||||
if `file --dereference --mime "#{file}"` =~ /binary/
|
||||
puts "#{file} is a binary file"
|
||||
exit 0
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ if [ ! -r "$FILE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$(file --mime "$FILE")" =~ binary ]]; then
|
||||
if [[ "$(file --dereference --mime "$FILE")" =~ binary ]]; then
|
||||
echo "$1 is a binary file"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user