aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorRaul Benencia <id@rbenencia.name>2023-01-23 08:25:35 -0800
committerRaul Benencia <id@rbenencia.name>2023-01-23 08:25:35 -0800
commit05fa1ef9e136ec7ed5be2c33a754c24973fa3544 (patch)
tree36f605845a050f3f57f5191659ea55a1d2bcce64 /.bashrc
parent4ce31be06b41a25d557725844123e79507267b63 (diff)
bash: fix git branch when not in git root
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 11c2b67..f34c245 100644
--- a/.bashrc
+++ b/.bashrc
@@ -97,7 +97,7 @@ prompt_command_notitle () {
local fullbranch="$(cat .git/HEAD 2>/dev/null)"
if [ "$fullbranch" = "" ]; then
- local fullbranch="$(git symbolic-ref HEAD 2>/dev/null)"
+ local fullbranch="ref: $(git symbolic-ref HEAD 2>/dev/null)"
fi
local branch="${fullbranch#ref: refs/heads/}"
vcsinfo="${branch:+#$branch}"
nihil fit ex nihilo