tmux-xpanes
tmux-xpanes copied to clipboard
Exit code is wrong in case of Normal mode1
So, tmux-xpanes is great and seems to do almost everything I'd like.
However, I'm using this in a bash script with -ss
provided, and I need a way to know if my subcommands succeeded. I thought from https://github.com/greymd/tmux-xpanes/wiki/Exit-Status that I'd simply be able to look at the value of $?
, and if it was nonzero, print a generic error message with the code.
It appears, on OSX at least, that instead of getting a number code, I'm getting a value of [exited]
, regardless of success/failure
Hi,
I could reproduce it.
When xpanes
starts from tmux session, the exit code is 31
.

But when it starts from normal terminal, exit code is always zero.

It might be the bug. I will work on it and I will report the progress on this issue. Thx!
It may be difficult to solve this issue since exit status of the command cannot be fetched outside of the tmux session.
bash-3.2# tmux new-session 'exit 123'
[exited]
bash-3.2# echo $?
0