diff options
Diffstat (limited to 'app-shells')
| -rw-r--r-- | app-shells/bash/bash-5.1_p16-r13.ebuild (renamed from app-shells/bash/bash-5.1_p16-r12.ebuild) | 37 | ||||
| -rw-r--r-- | app-shells/bash/bash-5.2_p26-r6.ebuild (renamed from app-shells/bash/bash-5.2_p26-r5.ebuild) | 37 | ||||
| -rw-r--r-- | app-shells/bash/bash-5.3_alpha-r5.ebuild (renamed from app-shells/bash/bash-5.3_alpha-r4.ebuild) | 37 | ||||
| -rw-r--r-- | app-shells/bash/bash-9999.ebuild | 40 | ||||
| -rw-r--r-- | app-shells/bash/files/bashrc.d/10-gentoo-title.bash | 13 |
5 files changed, 102 insertions, 62 deletions
diff --git a/app-shells/bash/bash-5.1_p16-r12.ebuild b/app-shells/bash/bash-5.1_p16-r13.ebuild index cc9ce6983938..38b7451addc3 100644 --- a/app-shells/bash/bash-5.1_p16-r12.ebuild +++ b/app-shells/bash/bash-5.1_p16-r13.ebuild @@ -328,22 +328,31 @@ pkg_postinst() { read -r old_ver <<<"${REPLACING_VERSIONS}" if [[ ! $old_ver ]]; then : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r1"; then + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r6"; then return - elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r8"; then + elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r13"; then return fi - ewarn "Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash." - ewarn "" - ewarn "Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the" - ewarn "characteristics of the operating environment, this array may contain commands" - ewarn "to set the window and pane title. Users that choose to customise this variable" - ewarn "in ~/.bashrc are advised to append their commands, using the following syntax." - ewarn "" - ewarn "PROMPT_COMMAND+=('custom command goes here')" - ewarn "" - ewarn "Alternatively, users that wish to opt out of Gentoo's window title setting" - ewarn "behaviour may now do so by either unsetting PROMPT_COMMAND or by re-defining it" - ewarn "as desired. Previously, there was no formally supported method of opting out." + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, this array may contain a command +to set the terminal's window title. Those already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash manipulate the window title in the case +that the terminal is controlled by sshd(8), unless screen or tmux are in use. +Those wanting to set the title unconditionally may adjust ~/.bashrc - or create +a custom /etc/bash/bashrc.d drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF } diff --git a/app-shells/bash/bash-5.2_p26-r5.ebuild b/app-shells/bash/bash-5.2_p26-r6.ebuild index e8eaa353cf21..4350a8a719c3 100644 --- a/app-shells/bash/bash-5.2_p26-r5.ebuild +++ b/app-shells/bash/bash-5.2_p26-r6.ebuild @@ -372,22 +372,31 @@ pkg_postinst() { read -r old_ver <<<"${REPLACING_VERSIONS}" if [[ ! $old_ver ]]; then : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r1"; then + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r6"; then return - elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r8"; then + elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r13"; then return fi - ewarn "Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash." - ewarn "" - ewarn "Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the" - ewarn "characteristics of the operating environment, this array may contain commands" - ewarn "to set the window and pane title. Users that choose to customise this variable" - ewarn "in ~/.bashrc are advised to append their commands, using the following syntax." - ewarn "" - ewarn "PROMPT_COMMAND+=('custom command goes here')" - ewarn "" - ewarn "Alternatively, users that wish to opt out of Gentoo's window title setting" - ewarn "behaviour may now do so by either unsetting PROMPT_COMMAND or by re-defining it" - ewarn "as desired. Previously, there was no formally supported method of opting out." + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, this array may contain a command +to set the terminal's window title. Those already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash manipulate the window title in the case +that the terminal is controlled by sshd(8), unless screen or tmux are in use. +Those wanting to set the title unconditionally may adjust ~/.bashrc - or create +a custom /etc/bash/bashrc.d drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF } diff --git a/app-shells/bash/bash-5.3_alpha-r4.ebuild b/app-shells/bash/bash-5.3_alpha-r5.ebuild index 9699a659026a..c0e5e68f43a5 100644 --- a/app-shells/bash/bash-5.3_alpha-r4.ebuild +++ b/app-shells/bash/bash-5.3_alpha-r5.ebuild @@ -371,22 +371,31 @@ pkg_postinst() { read -r old_ver <<<"${REPLACING_VERSIONS}" if [[ ! $old_ver ]]; then : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r1"; then + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r6"; then return - elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r8"; then + elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r13"; then return fi - ewarn "Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash." - ewarn "" - ewarn "Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the" - ewarn "characteristics of the operating environment, this array may contain commands" - ewarn "to set the window and pane title. Users that choose to customise this variable" - ewarn "in ~/.bashrc are advised to append their commands, using the following syntax." - ewarn "" - ewarn "PROMPT_COMMAND+=('custom command goes here')" - ewarn "" - ewarn "Alternatively, users that wish to opt out of Gentoo's window title setting" - ewarn "behaviour may now do so by either unsetting PROMPT_COMMAND or by re-defining it" - ewarn "as desired. Previously, there was no formally supported method of opting out." + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, this array may contain a command +to set the terminal's window title. Those already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash manipulate the window title in the case +that the terminal is controlled by sshd(8), unless screen or tmux are in use. +Those wanting to set the title unconditionally may adjust ~/.bashrc - or create +a custom /etc/bash/bashrc.d drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF } diff --git a/app-shells/bash/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild index ae661e409da8..7ef121e1c56f 100644 --- a/app-shells/bash/bash-9999.ebuild +++ b/app-shells/bash/bash-9999.ebuild @@ -311,6 +311,9 @@ src_install() { insinto /etc/bash/bashrc.d my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash doins "${FILESDIR}"/bashrc.d/10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi insinto /etc/skel for f in bash{_logout,_profile,rc}; do @@ -368,22 +371,31 @@ pkg_postinst() { read -r old_ver <<<"${REPLACING_VERSIONS}" if [[ ! $old_ver ]]; then : - elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r1"; then + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r6"; then return - elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r8"; then + elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge "5.1_p16-r13"; then return fi - ewarn "Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash." - ewarn "" - ewarn "Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the" - ewarn "characteristics of the operating environment, this array may contain commands" - ewarn "to set the window and pane title. Users that choose to customise this variable" - ewarn "in ~/.bashrc are advised to append their commands, using the following syntax." - ewarn "" - ewarn "PROMPT_COMMAND+=('custom command goes here')" - ewarn "" - ewarn "Alternatively, users that wish to opt out of Gentoo's window title setting" - ewarn "behaviour may now do so by either unsetting PROMPT_COMMAND or by re-defining it" - ewarn "as desired. Previously, there was no formally supported method of opting out." + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, this array may contain a command +to set the terminal's window title. Those already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash manipulate the window title in the case +that the terminal is controlled by sshd(8), unless screen or tmux are in use. +Those wanting to set the title unconditionally may adjust ~/.bashrc - or create +a custom /etc/bash/bashrc.d drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF } 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 003e364ff072..2b2e23347784 100644 --- a/app-shells/bash/files/bashrc.d/10-gentoo-title.bash +++ b/app-shells/bash/files/bashrc.d/10-gentoo-title.bash @@ -20,17 +20,18 @@ genfun_set_win_title() { # the title bar to be affected. genfun_set_win_title() { genfun_sanitise_cwd - printf '\033]2;%s@%s - %s\007' "${USER}" "${HOSTNAME%%.*}" "${_cwd}" + printf '\033]0;%s@%s - %s\007' "${USER}" "${HOSTNAME%%.*}" "${_cwd}" } genfun_set_win_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 +# Proceed no further if the TTY is that of sshd(8) and if not running a terminal +# multiplexer. Alas, there exist many operating environments in which the window +# title would otherwise not be restored upon ssh(1) exiting. Those who wish for +# the title to be set unconditionally may adjust ~/.bashrc - or create a custom +# bashrc.d drop-in - to define PROMPT_COMMAND=(genfun_set_win_title). +if [[ ${SSH_TTY} && ${TERM} != @(screen|tmux)* && ${SSH_TTY} == "$(tty)" ]]; then return fi |
