diff options
| author | Kerin Millar <kfm@plushkava.net> | 2025-09-25 18:52:02 +0100 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-09-30 21:14:05 +0100 |
| commit | cd1c4421557b64a8bbef675d8802e283fa1c3a8b (patch) | |
| tree | d091aaa5e1563dd8d304f43f2c1e81fc42ccd9df /app-shells/bash/bash-9999.ebuild | |
| parent | 82ef038c820564201ffc9f7c3e742be12a6c421c (diff) | |
| download | gentoo-cd1c4421557b64a8bbef675d8802e283fa1c3a8b.tar.gz gentoo-cd1c4421557b64a8bbef675d8802e283fa1c3a8b.tar.bz2 gentoo-cd1c4421557b64a8bbef675d8802e283fa1c3a8b.zip | |
app-shells/bash: revbump 5.2, 5.3 and 5.4 for improved title setting
This commit introduces the following versions.
- 5.2_p37-r5
- 5.3_p3-r3
- bash-5.4_alpha_pre20250918-r2 (replacing -r1)
They improve the window title setting behaviour by using the ${param@P}
form of expansion to expand "\u@\h \W" as a prompt string. A notable
consequence of this is that, upon switching to the home directory, the
current working directory will be shown as the <tilde> character again.
The value of PROMPT_DIRTRIM is now respected. If this variable is unset,
the use of the \W prompt string escape will prevail, with the current
working directory typically being shown as its basename. If set to 0 or
greater, \w will be used instead, which may be trimmed. This means that
the title can be made to show the full path by setting PROMPT_DIRTRIM=0.
Also, whitelist xterm-ghostty for XTWINOPS support.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells/bash/bash-9999.ebuild')
| -rw-r--r-- | app-shells/bash/bash-9999.ebuild | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/app-shells/bash/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild index 6211b96f2a29..7f5ca499dd43 100644 --- a/app-shells/bash/bash-9999.ebuild +++ b/app-shells/bash/bash-9999.ebuild @@ -316,7 +316,7 @@ src_install() { insinto /etc/bash/bashrc.d my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash - newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r3.bash 10-gentoo-title.bash insinto /etc/profile.d doins "${FILESDIR}/profile.d/00-prompt-command.sh" @@ -425,6 +425,32 @@ 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 fi + + if ver_test "${old_ver}" -ge "5.3" \ + && ver_test "${old_ver}" -ge "5.3_p3-r3" + then + : + elif ver_test "${old_ver}" -lt "5.3" \ + && ver_test "${old_ver}" -ge "5.2_p37-r5" + then + : + else + cat <<'EOF' +The window title setting behaviour has been improved. It is now formatted as +"\u@\h \W", in accordance with the prompting mechanism of bash. For example, +after switching to the home directory, the current working directly will be +shown as the <tilde> character. + +The value of PROMPT_DIRTRIM is now respected. If this variable is unset, the +use of the \W prompt string escape will prevail, with the current working +directory typically being shown as its basename. If set to 0 or greater, \w +will be used instead, which may be trimmed. This also means that the title +can be made to show the full path by setting PROMPT_DIRTRIM=0. + +For further information, run info '(bash)Bash Variables' or visit +https://www.gnu.org/software/bash/manual/bash.html#index-PROMPT_005fDIRTRIM. +EOF + fi } \ | if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then fmt -w "$(( COLUMNS - 3 ))" |
