From b1c03ea0eff13d94a0aa4769f0c8e9f6d0dbdfe1 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 28 Sep 2026 02:40:06 +0900 Subject: [PATCH] Drop an unreachable newline guard 'read' without '-d' stops at the first newline, so EXCMD never holds one, and a newline inside the ':execute' string stays in the sandbox anyway. --- bin/tagpreview.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/tagpreview.sh b/bin/tagpreview.sh index 2890a04..0bc0b01 100755 --- a/bin/tagpreview.sh +++ b/bin/tagpreview.sh @@ -34,9 +34,7 @@ fi # as soon as an entry is highlighted. Sandboxed as a builtin tag jump is, so that # it cannot run a shell command or touch a file. ':sandbox' on its own only covers # the command up to the first '|', so hand the whole address to ':execute' as a -# string literal, doubling the quotes in it. A newline would end that line and -# leave the rest outside the sandbox, and no tags file holds one, so drop them -EXCMD=${EXCMD//$'\n'/ } +# string literal, doubling the quotes in it EXCMD_LITERAL=${EXCMD//\'/\'\'} CENTER="$("${VIMNAME}" -R -i NONE -u NONE -e -m -s "${FILE}" \ -c "set nomagic" \