From df09a123ef888d4dd2873e2cbc54d7e0590a904e Mon Sep 17 00:00:00 2001 From: Evan Niessen-Derry Date: Sat, 1 Oct 2016 19:28:28 -0500 Subject: [PATCH] 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. --- sensible.tmux | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sensible.tmux b/sensible.tmux index 3993296..cf10313 100755 --- a/sensible.tmux +++ b/sensible.tmux @@ -45,8 +45,7 @@ server_option_value_not_changed() { } key_binding_not_set() { - local key="$1" - if [[ ${key} == '\' ]]; then key='\\'; fi + local key="${1//\\/\\\\}" if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then return 1 else