tmux only supports renaming the window with \033k, what you rename it to is
up to you.



On Tue, 1 Dec 2020, 18:56 , <[email protected]> wrote:

> I need the something in between to be the command I typed in shell.
>
> The configuration in rc file of GNU Screen is:
> shelltitle "$ |bash"
>
> so whatever follows $ sign (whatever typed before hitting enter) is
> copied in between \033k and the \033\\ and the desired label is set.
> Else you get 'bash'. I think that's how it works, not certain, but it
> works.
>
>
> Στις 1/12/20 8:36 μ.μ., ο/η Nicholas Marriott έγραψε:
> > You are renaming it to an empty name, you need to put something in
> > between the \033k and the \033\\.
> >
> >
> > On Tue, 1 Dec 2020 at 16:49, <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     Greetings,
> >
> >     For my preferences, tmux's automatic rename is not convenient. If for
> >     example I execute Ranger, a python file manager, I see 'python' in
> the
> >     label instead of 'ranger'. Also, the name change is not immediate, a
> >     refresh is needed, starting and quiting.
> >
> >     My tmux settings:
> >
> >     set -g automatic-rename on
> >     set -g automatic-rename-format "#{pane_current_command}"
> >
> >     So I'm trying to simulate GNU Screen's shelltitle feature in tmux,
> where
> >     the command entered in shell (for example ranger) is shown, not the
> app
> >     running (ie python). It's accurate and immediate, no need to wait for
> >     refresh. It also returns to 'bash' immediately, after quitting app.
> >
> >     In tmux manual I saw that it is possible to be done screen's way:
> >     set -g allow-rename on
> >
> >     and changing bash prompt. I already have this in .bashrc for screen:
> >     case "$TERM" in
> >     screen*|tmux*)
> >     PS1="\n\e[7m\t \e[1m\w \e[m\n\n"'\[\033k\033\\\]''\$ '
> >
> >     I also tried,
> >     PROMPT_COMMAND='printf "\033k\033\134"'
> >
> >     as in tmux manual
> >     (the exact is PROMPT_COMMAND="printf
> '\033k\033\\';"${PROMPT_COMMAND} )
> >
> >     The result I get is just an asterisk (*) which doesn't change.
> >
> >     Any ideas how to achieve shelltitle's behaviour?
> >     tmux version 2.8 on Debian
> >
> >     Thank you in advance
> >
> >     --
> >     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]
> >     <mailto:tmux-users%[email protected]>.
> >     To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/tmux-users/d114db31-3962-9c0c-b809-1696e813d14f%40gmx.com
> >     <
> https://groups.google.com/d/msgid/tmux-users/d114db31-3962-9c0c-b809-1696e813d14f%40gmx.com
> >.
> >
>
>

-- 
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 view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/CAEdLfcG6%2BAtDmYHEJ1FVAzafLdWtY16%3DAuapy2-ZY%2B0rXYooBw%40mail.gmail.com.

Reply via email to