mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Check list of default GIT branches
This commit is contained in:
parent
6e3ef61aa9
commit
c3185e8079
@ -76,9 +76,13 @@ function __bobthefish_escape_regex -a str -d 'A backwards-compatible `string esc
|
|||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
|
function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)'
|
||||||
|
[ -n "$theme_git_default_branches" ]
|
||||||
|
or set -l theme_git_default_branches refs/heads/master refs/heads/main
|
||||||
|
|
||||||
set -l ref (command git symbolic-ref HEAD 2>/dev/null)
|
set -l ref (command git symbolic-ref HEAD 2>/dev/null)
|
||||||
and begin
|
and begin
|
||||||
[ "$theme_display_git_master_branch" != 'yes' -a \( "$ref" = 'refs/heads/master' -o "$ref" = 'refs/heads/main' \) ]
|
[ "$theme_display_git_master_branch" != 'yes' ]
|
||||||
|
and contains $ref $theme_git_default_branches
|
||||||
and echo $branch_glyph
|
and echo $branch_glyph
|
||||||
and return
|
and return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user