commit 4a614abd000a08a176007cd661a69b16038deed7 parent 6313738906f760f8a9b73cfe18dc2593bee1b4c5 Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> Date: Sat, 4 Oct 2025 22:02:18 +0200 Stop special-casing Git repos in console window titles The prefixes that all this code shaves are fairly small, all things considered. Not sure this code carries its own weight. Diffstat:
| M | .bash_prompt | | | 18 | +----------------- |
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/.bash_prompt b/.bash_prompt @@ -33,23 +33,7 @@ __set-title () title+="@${HOSTNAME}" fi title+=: - - local path=${PWD/~/\~} - local git_root=$(git rev-parse --show-toplevel 2> /dev/null) - - if [ -z "${git_root}" -o "${git_root}" = ~ ] - then - title+=${path} - else - local project=$(basename "${git_root}") - path=$(realpath --relative-to "${git_root}" "${PWD}") - if [ "${path}" = . ] - then - title+=${project} - else - title+=${project}/${path} - fi - fi + title+=${PWD/~/\~} # Cf. console_codes(4): #