tmux run-shell fails to run the script with error code 2 #4186
Replies: 1 comment
-
|
This discussion has been automatically locked since there has not been any recent activity after it was closed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have the following script which runs just fine when I run it from shell directly within a tmux session. However when I try to run it as
tmux run-shellit fails with error code 2.test.shRunning directly from terminal works fine
/bin/sh $HOME/test.sh. However doingtmux run-shell "$HOME/test.sh"fails with/Users/rbhanot/test.sh' returned 2. This is a simplified version of my script and eventually I want to map this script to a keybinding in tmux, so that I run it quickly but I am not sure why it is failing, so something like thisbind M-m run-shell '"$HOME/test.sh"'.I tested this both tmux version 3.4 and 3.5 and got the same error, so I guess there is something wrong with what I am doing but I am not a shell wizard, so not sure if I am missing something obvious here?
Infact here is a dead simple version of the same which fails with exact same error
test.shRun it with
tmux run-shell "$HOME/test.sh"and it fails.Beta Was this translation helpful? Give feedback.
All reactions