Bugfix for 'prefix + R' key binding

pull/27/head
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
### master
- bugfix for `prefix + R` key binding
### v2.2.0, 2015-02-10
- 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() {
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
else
return 0
@ -160,7 +160,7 @@ main() {
# source `.tmux.conf` file - as suggested in `man tmux`
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 display-message "Sourced .tmux.conf!"'
fi