27medkamal / tmux-session-wizard

One prefix to control all your session creation, naming, switching, etc using fzf & zoxide
MIT License
180 stars 14 forks source link

Environment variables not passed to tmux subshell #1

Closed herder closed 1 year ago

herder commented 2 years ago

Hi, thanks for this plugin - a really great idea!

When I'm running it under zsh it doesn't get any of the environment variables in the session-wizard.sh subshell, causing the call to fail since fzf is not present in the PATH.

When I add this check

if [[ ! "$PATH" == */home/niklas/.fzf/bin* ]]; then
  export PATH="${PATH:+${PATH}:}/home/niklas/.fzf/bin"
fi

it works, but that's obviously not very scalable :)

I haven't found a good way to make sure that all shell variables are passed to the subshell from tmux - do you have any ideas on that?

27medkamal commented 2 years ago

I'm using ZSH and I've seen other people use ZSH with this plugin without any problem. Do you maybe have any non-conventional setup? do you have this line in you ~/.zshrc?

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

And do you have fzf in your /usr/local/bin/fzf

Those are the places I would check