From 1d34a13e93479455e4b7adcba5e7a31b43df32e4 Mon Sep 17 00:00:00 2001 From: Emmanuel Touzery Date: Mon, 13 Nov 2023 19:13:35 +0100 Subject: [PATCH] this seems to fix neovim 0.7.2+ --- README.md | 2 +- invim | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bfdbce9..7d07080 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't use ~/bin, swap that for another directory on your path. # Usage ``` - invim [options] file Edit file in the Neovim running at $NVIM_LISTEN_ADDRESS + invim [options] file Edit file in the Neovim running at $NVIM Options: --remote Open the file with :edit. This is the default diff --git a/invim b/invim index ef48c9b..d80297d 100755 --- a/invim +++ b/invim @@ -1,12 +1,12 @@ #!/usr/bin/env bash set -o errexit -if [[ ! $NVIM_LISTEN_ADDRESS ]] ; then - echo 'Error: Neovim must be running and have set $NVIM_LISTEN_ADDRESS for invim to communicate with it' >&2 +if [[ ! $NVIM ]] ; then + echo 'Error: Neovim must be running and have set $NVIM for invim to communicate with it' >&2 exit 1 fi -# Now that we've checked for NVIM_LISTEN_ADDRESS, we don't want any more undefined +# Now that we've checked for NVIM, we don't want any more undefined set -o nounset # Defaults @@ -33,7 +33,7 @@ function abspath() { function usage() { cat <<'EOF' Usage: - invim [options] file Edit file in the Neovim running at $NVIM_LISTEN_ADDRESS + invim [options] file Edit file in the Neovim running at $NVIM Options: --remote Open the file with :edit. This is the default @@ -115,7 +115,7 @@ $COMMAND \ <