aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Mario <marioortizmanero@gmail.com>2020-06-10 01:58:35 +0200
committerGravatar GitHub <noreply@github.com>2020-06-10 05:28:35 +0530
commit5a6078967b9ea2d71c636073ab27c298404ff661 (patch)
tree2cae842ee2cc9cc70bb983d96948c92477f1e346
parentb3e2ffc2e6fe4a89dfbe8b43d0cfa823fcb4e41f (diff)
downloadnnn-5a6078967b9ea2d71c636073ab27c298404ff661.tar.gz
Fixes environmental variables not being passed on preview-tui (#644)
-rwxr-xr-xplugins/preview-tui6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/preview-tui b/plugins/preview-tui
index 4fab07e..a7b1101 100755
--- a/plugins/preview-tui
+++ b/plugins/preview-tui
@@ -195,8 +195,12 @@ elif [ "$TERMINAL" = "kitty" ]; then
kitty @ goto-layout splits >/dev/null
# Trying to use kitty's integrated window management as the split window.
+ # All environmental variables that will be used in the new window must
+ # be explicitly passed.
kitty @ launch --no-response --title "nnn preview" --keep-focus \
- --cwd "$PWD" --env "NNN_FIFO=$NNN_FIFO" --env "PREVIEW_MODE=1" \
+ --cwd "$PWD" --env "PATH=$PATH" --env "NNN_FIFO=$NNN_FIFO" \
+ --env "PREVIEW_MODE=1" --env "PAGER=$PAGER" \
+ --env "USE_SCOPE=$USE_SCOPE" --env "SPLIT=$SPLIT" \
--location "${SPLIT}split" "$0" "$1" >/dev/null
# Restoring the previous layout.