Tmux Configuration for Multiple Versions

The if-shell tmux-build-in combined with perl allows for shell independent version checking. The following set -g <something> is trivial and can be used for a wide range of options:

if-shell "perl -e 'exit 0 if qx/tmux -V/ =~ /^tmux (\d+\.\d*).*$/ and $1 < 2.1 or exit 1'" \
"tmux set -g utf8"

Leave a Reply

Your email address will not be published. Required fields are marked *