mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Don't show detached branch ref if we've already shown a tag.
This commit is contained in:
parent
f5ba0ce022
commit
8669f50569
@ -66,8 +66,11 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish
|
||||
and return
|
||||
end
|
||||
|
||||
set -l branch (command git show-ref --head -s --abbrev | head -n1 2>/dev/null)
|
||||
echo "$detached_glyph $branch"
|
||||
# If we've already shown a tag we don't need to show a detached branch
|
||||
if [ -z "$tag" ]
|
||||
set -l branch (command git show-ref --head -s --abbrev | head -n1 2>/dev/null)
|
||||
echo "$detached_glyph $branch"
|
||||
end
|
||||
end
|
||||
|
||||
function __bobthefish_hg_branch -S -d 'Get the current hg branch'
|
||||
|
Loading…
Reference in New Issue
Block a user