Skip to main content
added 25 characters in body
Source Link
vatosarmat
  • 262
  • 4
  • 13

tmux run-shell runs command as sh -c which doesn't source .bashrc. Also on some systems sh is not a bash at all but dash. So one have to explicitly run bash and pass functions using --rcfile optionsource the file where required function defined before calling it: bind-key t run-shell "bash --rcfile ~/.tmux.bash -c 'tmux__ranger_to_vim'"

bind-key t run-shell 'bash -c "source ~/.tmux.bash ; tmux__ranger_to_vim"' 

tmux run-shell runs command as sh -c which doesn't source .bashrc. Also on some systems sh is not a bash at all but dash. So one have to explicitly run bash and pass functions using --rcfile option: bind-key t run-shell "bash --rcfile ~/.tmux.bash -c 'tmux__ranger_to_vim'"

tmux run-shell runs command as sh -c which doesn't source .bashrc. Also on some systems sh is not a bash at all but dash. So one have to explicitly source the file where required function defined before calling it:

bind-key t run-shell 'bash -c "source ~/.tmux.bash ; tmux__ranger_to_vim"' 
Source Link
vatosarmat
  • 262
  • 4
  • 13

tmux run-shell runs command as sh -c which doesn't source .bashrc. Also on some systems sh is not a bash at all but dash. So one have to explicitly run bash and pass functions using --rcfile option: bind-key t run-shell "bash --rcfile ~/.tmux.bash -c 'tmux__ranger_to_vim'"