5

So I made my ~/.tmux.conf as suggested in other threads in two different ways

tmux show -g | cat > ~/.tmux.conf
tmux show -g > ~/.tmux.conf

I tested them both and they both give me an error:

/root/.tmux.conf:25: unknown command: followed by every setting when loading from the first line to the second to last line, the last line being the binding that I added:

bind -n C-x setw synchronize-panes

Good news is that my binding works...

I have zero idea what is causing the error, but the fact that my binding works makes me think that you might only want to add additional configurations other then the default in the .tmux.conf

Any help with this issue or clarification will be greatly appreciated.

10

It appears tmux.conf syntax has changed and these commands no longer generate a syntactically valid file.

To convert options shown by tmux show -g to valid tmux commands you need to add set-option -g (shorter alias: set -g) in front of each one.

tmux show -g | sed 's/^/set -g /' > ~/.tmux.conf

Note: one of the lines my tmux show -g generates is prefix2 <NONE> which seems to be invalid later. Just remove it if you need, many other lines should be fine. My tmux version is 2.1-3build1 in Kubuntu 16.04.4 LTS.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.