Skip to content

Commit bce6588

Browse files
ptzzjunegunn
authored andcommitted
Fix preview of paths starting with ~/ (#892)
1 parent 359a80e commit bce6588

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

bin/preview.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [[ $1 =~ ^[A-Z]:\\ ]]; then
1717
CENTER=${INPUT[2]}
1818
fi
1919

20+
FILE="${FILE/#\~\//$HOME\/}"
2021
if [ ! -r "$FILE" ]; then
2122
echo "File not found ${FILE}"
2223
exit 1

0 commit comments

Comments
 (0)