From 3fc07fbbe563ae7bd939045e36106dc11359adfe Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 10 Apr 2023 21:06:24 +0200 Subject: [PATCH] wezterm-edit-helper: hide escape code output --- bin/wezterm-edit-helper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/wezterm-edit-helper b/bin/wezterm-edit-helper index b5f34c5..457ba05 100755 --- a/bin/wezterm-edit-helper +++ b/bin/wezterm-edit-helper @@ -17,10 +17,11 @@ fi _nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock" function _nvim_setenv() { - nvim --server "$_nvim_socket" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")" + nvim --server "$_nvim_socket" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")" 2>&1 >/dev/null } -nvim --server "$_nvim_socket" --remote-expr "42" 2>/dev/null || + +nvim --server "$_nvim_socket" --remote-expr "42" 2>&1 >/dev/null || (rm -f "$_nvim_socket" && wezterm cli spawn --cwd "${PWD}" nvim --listen "$_nvim_socket" && sleep 0.5) _nvim_setenv BUILD_COMMAND "$BUILD_COMMAND"