mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-16 20:28:50 +00:00
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.
This commit is contained in:
parent
6bd0e2b221
commit
df09a123ef
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user