Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 896257 Details for
Bug 934732
app-shells/bash: bash shouldn't be made to emit the Title Definition String escape sequence
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bash-no-screen-tmux-title.patch
bash-no-screen-tmux-title.patch (text/plain), 2.74 KB, created by
Sven Wegener
on 2024-06-22 17:05:14 UTC
(
hide
)
Description:
bash-no-screen-tmux-title.patch
Filename:
MIME Type:
Creator:
Sven Wegener
Created:
2024-06-22 17:05:14 UTC
Size:
2.74 KB
patch
obsolete
>From: Sven Wegener <swegener@gentoo.org> >Date: Sat, 22 Jun 2024 18:47:32 +0200 >Subject: [PATCH] app-shells/bash: do not update internal window title of > screen and tmux > >The k escape sequence changes the internal window title of screen and >tmux, which is an alias given to the window by the user. The alias can >be used to reference the window in internal commands, e.g. by using >"select <alias>" in screen or "select-window -t <alias>" in tmux to >switch to a window by name, and should not be updated by commands >running inside of screen and tmux. > >Closes: https://bugs.gentoo.org/934732 >Signed-off-by: Sven Wegener <swegener@gentoo.org> > >diff --git a/app-shells/bash/files/bashrc.d/10-gentoo-title.bash b/app-shells/bash/files/bashrc.d/10-gentoo-title.bash >index 0246d4fa36f0d..270c00484b798 100644 >--- a/app-shells/bash/files/bashrc.d/10-gentoo-title.bash >+++ b/app-shells/bash/files/bashrc.d/10-gentoo-title.bash >@@ -16,7 +16,7 @@ genfun_set_win_title() { > > # Sets the window title with the Set Text Parameters sequence. For > # screen, the sequence defines the hardstatus (%h) and for tmux, the >- # window_name (#W). For graphical terminal emulators, it is normal for >+ # pane_title (#T). For graphical terminal emulators, it is normal for > # the title bar be affected. > genfun_set_win_title() { > genfun_sanitise_cwd >@@ -26,27 +26,13 @@ genfun_set_win_title() { > genfun_set_win_title > } > >-# Set window title with the Title Definition String sequence. For screen, the >-# sequence defines the window title (%t) and for tmux, the pane_title (#T). >-# For tmux to be affected requires that its allow-rename option be enabled. >-# https://www.gnu.org/software/screen/manual/html_node/Control-Sequences.html >-case ${TERM} in >- screen*|tmux*) >- genfun_set_pane_title() { >- printf '\033k%s\033\\' "${HOSTNAME%%.*}" >- } >- PROMPT_COMMAND+=('genfun_set_pane_title') >- ;; >- *) >- # If the TTY is that of sshd(8) then proceed no further. Alas, >- # there exist many operating environments in which the window >- # title would otherwise not be restored upon ssh(1) exiting. >- # Users wishing to coerce the historical behaviour have the >- # option of setting PROMPT_COMMAND=(genfun_set_win_title). >- if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then >- return >- fi >-esac >+# If the TTY is that of sshd(8) then proceed no further. Alas, there exist many >+# operating environments in which the window title would otherwise not be >+# restored upon ssh(1) exiting. Users wishing to coerce the historical >+# behaviour have the option of setting PROMPT_COMMAND=(genfun_set_win_title). >+if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then >+ return >+fi > > # Determine whether the terminal can handle the Set Text Parameters sequence. > # The only terminals permitted here are those for which there is empirical
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 934732
: 896257