UP | HOME

Ping's Tech Notes

Fix A Problem When Applying .tmux.conf

Ping Zhou, 2020-06-10

For some reason I’m starting to get this error when I apply tmux configuration:

cut -c3- ~/.tmux.conf | sh -s _apply_configuration returned -2

So the problem is that “sh” used to work here, but at some point it doesn’t when a new shell is installed. Furthermore, I guess the reason is that “sh” used to be resolved into “bash” and the syntax was written in bash accordingly. If “sh” gets resolved into some other shell, it might cause syntax error or something.

So the solution is very straightforward: Just change “sh” into “bash”.

cut -c3- ~/.tmux.conf | bash -s _apply_configuration

That’s it!