From 558c7936b1d556e876e8e96f0bcbf37674d9c035 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 1 Apr 2024 23:36:31 +0200 Subject: [PATCH] tmux: ensure env vars are set in helpers --- bin/tmux-hx-helper | 22 +++++++++++++++++++++- bin/tmux-nvim-helper | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/bin/tmux-hx-helper b/bin/tmux-hx-helper index 9370832..56bdb95 100755 --- a/bin/tmux-hx-helper +++ b/bin/tmux-hx-helper @@ -20,4 +20,24 @@ fre --store_name "edit-history" --add "$_file" (tmux select-window -t helix && tmux send-keys -t helix Escape && -tmux send-keys -t helix ":open ${_file}" Enter) || tmux new-window -t 42 -n helix helix "${_file}" +tmux send-keys -t helix ":open ${_file}" Enter) || tmux new-window -t 42 -n helix \ + -e "AR=$AR" \ + -e "AS=$AS" \ + -e "BUILD_COMMAND=$BUILD_COMMAND" \ + -e "CC=$CC" \ + -e "CXX=$CXX" \ + -e "GOFLAGS=$GOFLAGS" \ + -e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \ + -e "LC_ALL=$LC_ALL" \ + -e "LD=$LD" \ + -e "NM=$NM" \ + -e "NM=$NM" \ + -e "OBJCOPY=$OBJCOPY" \ + -e "OBJDUMP=$OBJDUMP" \ + -e "PATH=$PATH" \ + -e "RANLIB=$RANLIB" \ + -e "READELF=$READELF" \ + -e "RUST_SRC_PATH=$RUST_SRC_PATH" \ + -e "SIZE=$SIZE" \ + -e "STRIP=$STRIP" \ + helix "${_file}" diff --git a/bin/tmux-nvim-helper b/bin/tmux-nvim-helper index 033e05b..4b35744 100755 --- a/bin/tmux-nvim-helper +++ b/bin/tmux-nvim-helper @@ -23,7 +23,7 @@ _nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock" (tmux select-window -t nvim 2>/dev/null && tmux select-pane -t 0) && exec nvim --server "$_nvim_socket" --remote "$_file" # nvim is not running/listening on remote socket, so start it. -tmux new-window -S -t 1001-n nvim \ +tmux new-window -S -t 43 -n nvim \ -e "AR=$AR" \ -e "AS=$AS" \ -e "BUILD_COMMAND=$BUILD_COMMAND" \