Fixed key_binding_not_set regex issue

If you run key_binding_not_set against '\' that character will be placed
as is in the regex that's run, and will escape something it shouldn't.
So we test for this and escape the character if necessary.
pull/37/head
Evan Niessen-Derry 2016-10-01 19:15:26 -05:00
parent 526110eb9b
commit 6bd0e2b221
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ server_option_value_not_changed() {
key_binding_not_set() {
local key="$1"
if [[ ${key} == '\' ]]; then key='\\'; fi
if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then
return 1
else