[Windows] Add preview

Close #1487
This commit is contained in:
Junegunn Choi
2023-09-06 18:25:39 +09:00
parent 19dec6c038
commit 2c501dc5a2
3 changed files with 10 additions and 7 deletions

View File

@@ -3,17 +3,20 @@
REVERSE="\x1b[7m"
RESET="\x1b[m"
if [ -z "$1" ]; then
if [[ $# -lt 1 ]]; then
echo "usage: $0 [--tag] FILENAME[:LINENO][:IGNORED]"
exit 1
fi
if [ "$1" = --tag ]; then
if [[ $1 = --tag ]]; then
shift
"$(dirname "${BASH_SOURCE[0]}")/tagpreview.sh" "$@"
exit $?
fi
# Ignore if an empty path is given
[[ -z $1 ]] && exit
IFS=':' read -r -a INPUT <<< "$1"
FILE=${INPUT[0]}
CENTER=${INPUT[1]}