tmux-resurrect
tmux-resurrect copied to clipboard
add support to changed special character handling
Newer versions of tmux (observed on 3.4, on Ubuntu 24.04) in comparison to the older one (observed on 3.2a, on Ubuntu 22.04) changed behavior in how special characters within the option values are returned by the command tmux show-option -gqv. Now, it adds a leading backslash to each special character.
On Ubuntu 22.04 with tmux 3.2a:
$ tmux -V
tmux 3.2a
$ tmux show-option -gqv '@resurrect-dir'
~/.tmux/resurrect/$HOSTNAME
On Ubuntu 24.04 with tmux 3.4:
$ tmux -V
tmux 3.4
$ tmux show-option -gqv '@resurrect-dir'
~/.tmux/resurrect/\$HOSTNAME
This breaks the expansion of environment variables that is done by the function resurrect_dir() (in #/scripts/helpers.sh).
This commit adds support for this new representation of special characters, in addition to the older ones.