Fix regex in key_binding_not_set

Fixes #15
This commit is contained in:
Bruno Sutic 2014-12-23 23:04:28 +01:00
parent 22d1305cb7
commit b5a1c2ade5
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
2 changed files with 3 additions and 1 deletions

View File

@ -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)

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:]]\+${key}"); then
if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}"); then
return 1
else
return 0