From b5a1c2ade5ba03fa6159a5862ae0804757ed0de9 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 23 Dec 2014 23:04:28 +0100 Subject: [PATCH] Fix regex in `key_binding_not_set` Fixes #15 --- CHANGELOG.md | 2 ++ sensible.tmux | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c68a8..956149f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ### master +- bugfix in `key_binding_not_set`: the regex is now properly detecting key + bindings with `-r` flag. ### v2.1.0, 2014-12-12 - check before binding `prefix + prefix` (@m1foley) diff --git a/sensible.tmux b/sensible.tmux index 84854f1..c0dd06c 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:]]\+${key}"); then + if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}"); then return 1 else return 0