zolrath / wemux

Multi-User Tmux Made Easy
MIT License
3.63k stars 139 forks source link

Return an error exit status from client commands that fail #47

Closed nilbus closed 9 years ago

nilbus commented 9 years ago

Commands like wemux pair should exit with a non-zero status when the command fails. In my specific use case, .bash_profile attempts to attach to wemux, if running, and falls back to a different command if not running.

$ wemux pair
No wemux server to pair with on 'wemux'.
$ echo $?
126

I believe this patch covers all the client commands. I haven't looked at the server commands, so you may want to do that own your own.

zolrath commented 9 years ago

Makes good sense, thank you! Sorry for the insane delay.