tmux bug or single quotes (intentionally) required?

219 views
Skip to first unread message

Thomas Sattler

unread,
Oct 26, 2015, 11:02:29 AM10/26/15
to tmux-...@googlegroups.com
Hi there ...

I'd like to bind Ctrl-End to select the rightmost window. It is
working fine when defining it at the commandline:

$ tmux lsk | grep -e C-End # not yet defined
$ tmux bind-key -T root C-End select-window -t :$
$ tmux lsk | grep -e C-End
bind-key -T root C-End select-window -t :$

The binding is also working as expected, but trying to put it
into my tmux.conf like this

bind-key -n C-End select-window -t :$

fails when starting tmux (or reloading config):

invalid or unknown command: bind-key -n C-End select-window -t :$

Using the alternative syntax (tmux-2.1 only)

bind-key -n C-End select-window -t :{end}

is working. Or a backward-compatible workaround via 'run':

run 'tmux bind-key -n C-End select-window -t :$'

Using double quote (") also fails:

bind-key -n C-End select-window -t ":$"

while single quote (') also works:

bind-key -n C-End select-window -t ':$'

Is/was this behaviour intended?

Thomas

P.S.: Doing the same thing for Ctrl-Home to select :^ works.

Nicholas Marriott

unread,
Oct 26, 2015, 11:16:54 AM10/26/15
to Thomas Sattler, tmux-...@googlegroups.com
$ is a special character so you should put it in single quotes.
> --
> You received this message because you are subscribed to the Google Groups "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
> To post to this group, send an email to tmux-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Thomas Sattler

unread,
Oct 26, 2015, 11:44:35 AM10/26/15
to tmux-...@googlegroups.com

Am 26.10.2015 um 16:16 schrieb Nicholas Marriott:
> $ is a special character so you should put it in single quotes.

I know $ is special in a shell, but what is so special about
it *inside* tmux.conf? The manpage mentions it several times:

- 18x as a prompt like this:

$ tmux attach OR $ printf '\033kWINDOW_NAME\033\\'

- twice as a hotkey for rename-session and in vi-mode

- twice as a prefix to a session ID

- once as a token for a window ID (this is what I did)

It is never mentioned that $ should be quoted in tmux.conf.

Thomas
Reply all
Reply to author
Forward
0 new messages