]> Sergey Matveev's repositories - nnn.git/commitdiff
Fixes environmental variables not being passed on preview-tui (#644)
authorMario <marioortizmanero@gmail.com>
Tue, 9 Jun 2020 23:58:35 +0000 (01:58 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jun 2020 23:58:35 +0000 (05:28 +0530)
plugins/preview-tui

index 4fab07eb6ea3e57c2c43ccba69ab9de0548fd619..a7b1101aa6c0245cc26194ce329f5a82e7a4bf92 100755 (executable)
@@ -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.