[Tags] Add a tag preview with a custom tagpreview.sh script (#1223)

* Add a tag preview with a custom `tagpreview.sh` script

* [Tags] Respect g:fzf_preview_window

Co-authored-by: Ingo Meyer <IJ_M@gmx.de>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
Ingo Meyer
2021-01-17 14:36:02 +01:00
committed by GitHub
parent d43df0ea2f
commit 1fcdee55cc
4 changed files with 69 additions and 3 deletions

View File

@@ -4,10 +4,16 @@ REVERSE="\x1b[7m"
RESET="\x1b[m"
if [ -z "$1" ]; then
echo "usage: $0 FILENAME[:LINENO][:IGNORED]"
echo "usage: $0 [--tag] FILENAME[:LINENO][:IGNORED]"
exit 1
fi
if [ "$1" = --tag ]; then
shift
"$(dirname "${BASH_SOURCE[0]}")/tagpreview.sh" "$@"
exit $?
fi
IFS=':' read -r -a INPUT <<< "$1"
FILE=${INPUT[0]}
CENTER=${INPUT[1]}