dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 6eaef7aebf35df6dfaa9cca5bb0a2ccc98a18d0b
parent 0379d79825844f6d37b100b21ceb6a3f84088c30
Author: Chris Bracken <chris@bracken.jp>
Date:   Thu, 11 Dec 2025 16:11:24 +0900

zsh: show the git SHA rather than just HEAD in detached HEAD states

Diffstat:
M.config/zsh/.zshrc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -39,7 +39,7 @@ vcs_branch() { # If we're in a git repo, output the current branch name. local branch - branch="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" + branch="$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)" if [[ -n $branch ]]; then echo -n " ($branch)" fi