aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 8d5a15c..15a02f6 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -60,7 +60,8 @@ $(yellow "└─╼") "
function get_git_branch {
if [[ -d .git ]]; then
- branch="$(git rev-parse --abbrev-ref HEAD) "
+ branch="$(< .git/HEAD)"
+ branch="${branch##*/} "
else
branch=""
fi