Fix preview of paths starting with ~/ (#892)

This commit is contained in:
ptzz
2019-11-01 02:31:41 +01:00
committed by Junegunn Choi
parent 359a80e3a3
commit bce6588d24

View File

@@ -17,6 +17,7 @@ if [[ $1 =~ ^[A-Z]:\\ ]]; then
CENTER=${INPUT[2]} CENTER=${INPUT[2]}
fi fi
FILE="${FILE/#\~\//$HOME\/}"
if [ ! -r "$FILE" ]; then if [ ! -r "$FILE" ]; then
echo "File not found ${FILE}" echo "File not found ${FILE}"
exit 1 exit 1