Bugfix for 'prefix + R' key binding

This commit is contained in:
Bruno Sutic 2015-02-12 16:42:33 +01:00
parent e725d88256
commit 9d61936c53
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Changelog # Changelog
### master ### master
- bugfix for `prefix + R` key binding
### v2.2.0, 2015-02-10 ### v2.2.0, 2015-02-10
- bugfix in `key_binding_not_set`: the regex is now properly detecting key - bugfix in `key_binding_not_set`: the regex is now properly detecting key

View File

@ -41,7 +41,7 @@ server_option_value_not_changed() {
key_binding_not_set() { key_binding_not_set() {
local key="$1" local key="$1"
if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}"); then if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}[[:space:]]"); then
return 1 return 1
else else
return 0 return 0
@ -160,7 +160,7 @@ main() {
# source `.tmux.conf` file - as suggested in `man tmux` # source `.tmux.conf` file - as suggested in `man tmux`
if key_binding_not_set "R"; then if key_binding_not_set "R"; then
tmux bind-key R run-shell -b ' \ tmux bind-key R run-shell ' \
tmux source-file ~/.tmux.conf > /dev/null; \ tmux source-file ~/.tmux.conf > /dev/null; \
tmux display-message "Sourced .tmux.conf!"' tmux display-message "Sourced .tmux.conf!"'
fi fi