0

I’m trying to extract the remote host of a system I’m SSHing into.

tmux’s

pane_title
variable looks like:

And I tried to set the window status like:

:setw -g window-status-format ' #I:#{s/^.*@(.*):.*/1/i:pane_title}'

But with this, the window status looks like

1:
, so maybe tmux is misinterpreting the first colon?

Is there a way to escape a

:
in a prefix?

I tried using a backslash to escape it:

:setw -g window-status-format ' #I:#{s/^.*@(.*):.*/1/i:pane_title}'

But that did not change the window status.

$ tmux -V
tmux 3.2