From 4a614abd000a08a176007cd661a69b16038deed7 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 4 Oct 2025 22:02:18 +0200 Subject: 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. --- .bash_prompt | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.bash_prompt b/.bash_prompt index 97297d4..e3c9a87 100644 --- 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): # -- cgit v1.2.3