There are two ways to do this:

- You can turn on allow-rename and then use the rename window escape
sequences (\033k...\033\\) to rename the window from the remote host (say
in your .profile), for example: printf "\033k$(hostname -s)\033\\\\"

- You can write a script to do this from the local machine either using the
same escape sequence, using tmux renamew, or putting it in say a user
variable or environment variable that you can access from
window-status-format, then aliasing that script to ssh.




On 7 January 2018 at 14:06, liuyuanting1209 <[email protected]> wrote:

> Hi,
>
> I want to change the window name to the remote ssh-to-host name. But I
> failed to find the way. host or host_short only show's the local "host"
> name. Could you please help to tell me the method. Thanks a lot.
>
> Thanks,
> Sean Liu
>
>
>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to