tmux의 변수에서 C-\ 바인딩

tmux의 변수에서 C-\ 바인딩

에서는 .tmux.conf다음이 예상대로 작동합니다.

bind -n C-\ display-message 'hello'

변수(예: )에 정의된 키를 바인딩하려고 합니다 key. 나는 다음과 같은 두 가지 시도를 했습니다.

a=C-\
bind -n $a display-message 'hello'
# Produces: unknown command: -n

a=C-\\
bind -n $a display-message 'hello'
# Produces: unknown key: C-\\

내가 원하는 것을 달성할 수 있는 방법이 있나요?

답변1

첫 번째 경우에는 \줄바꿈이 계속되거나 뭔가를 만들기 전에 개행이 필요하다고 생각합니다.

이것은 작동합니다:

a='C-\'
bind -n $a display-message 'hello'

관련 정보