More suscinct and flexible escape char fix
To handle the possibility of the escape character being anywhere in the key passed to `key_binding_not_set`, I've opted to use parameter replacement to escape every escape character. This is more suscinct, and will make sure every '\' is handled.pull/37/head
parent
6bd0e2b221
commit
df09a123ef
|
@ -45,8 +45,7 @@ server_option_value_not_changed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
key_binding_not_set() {
|
key_binding_not_set() {
|
||||||
local key="$1"
|
local key="${1//\\/\\\\}"
|
||||||
if [[ ${key} == '\' ]]; then key='\\'; fi
|
|
||||||
if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then
|
if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue