mirror of
				https://github.com/tmux-plugins/tmux-sensible.git
				synced 2025-11-04 00:16:03 +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:
		@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user