From 9d61936c53290a38688ccffc69427c8e7cd7238b Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 12 Feb 2015 16:42:33 +0100 Subject: [PATCH] Bugfix for 'prefix + R' key binding --- CHANGELOG.md | 1 + sensible.tmux | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee83175..ce63f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/sensible.tmux b/sensible.tmux index 9c2582a..871f0df 100755 --- a/sensible.tmux +++ b/sensible.tmux @@ -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