mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Add option to globally enable or disable preview window
This commit is contained in:
@@ -17,14 +17,19 @@ if [[ $1 =~ ^[A-Z]:\\ ]]; then
|
||||
CENTER=${INPUT[2]}
|
||||
fi
|
||||
|
||||
if [[ ! "$CENTER" =~ ^[0-9]*$ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILE="${FILE/#\~\//$HOME/}"
|
||||
if [ ! -r "$FILE" ]; then
|
||||
echo "File not found ${FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$(file --dereference --mime "$FILE")" =~ binary ]]; then
|
||||
echo "$1 is a binary file"
|
||||
MIME=$(file --dereference --mime "$FILE")
|
||||
if [[ "$MIME" =~ binary ]]; then
|
||||
echo "$MIME"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user