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.
This commit is contained in:
Evan Niessen-Derry 2016-10-01 19:15:26 -05:00
parent 526110eb9b
commit 6bd0e2b221

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