mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Do not preview binary files
This commit is contained in:
@@ -22,6 +22,11 @@ if [ ! -r "$FILE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$(file --mime "$FILE")" =~ binary ]]; then
|
||||
echo "$1 is a binary file"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$CENTER" ]; then
|
||||
CENTER=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user