`prefix + R` is currently bound to sourcing `~/.tmux.conf`.
For anyone using `~/.config/tmux/tmux.conf` or `${XDG_CONFIG_HOME}/tmux/tmux.conf`,
this binding will be of no use, perhaps even misleading.
This patch tests if the file `${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf` exists,
if affirmative, it sources it, if not, it sources `~/.tmux.conf`.
To handle the possibility of the escape character being anywhere in the
key passed to `key_binding_not_set`, I've opted to use parameter
replacement to escape every escape character. This is more suscinct, and
will make sure every '\' is handled.
If you run key_binding_not_set against '\' that character will be placed
as is in the regex that's run, and will escape something it shouldn't.
So we test for this and escape the character if necessary.
Tmux 2.2 removed `utf8` and `status-utf8` options. Since we still want
to keep these options for earlier tmux versions we're redirecting the
output to /dev/null when setting these commands. This way tmux 2.2 (and
above) users won't get any errors when running this plugin.
Assuming no one uses C-b as the default prefix is a wrong assumption.
Instead of making any assumption about the prefix, we're "building" on
top of whatever the user has set.
The following key-bindings will be set if prefix is set to C-a:
- `C-a + C-a` - sends prefix character
- `C-a + a` - switches to the last window
Likewise, if C-b is prefix, then the additional bindings will be
`C-b + C-b` and `C-b + b`.
Closes#1
The `default-command` setting on OS X determines the default shell if
`default-shell` is not set.
This update enables use of any user defined shell, even if
`default-shell` is not set.
Fixes#2