From 2e0f04b555c283c09f7997c555bdfc792c1db013 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 5 Mar 2024 17:57:41 -0500 Subject: [PATCH] Support `init.defaultBranch` Git configuration option. --- functions/fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 91a2c59..81ff6eb 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -47,7 +47,7 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish set -l branch (command git symbolic-ref HEAD 2>/dev/null | string replace -r '^refs/heads/' '') and begin [ -n "$theme_git_default_branches" ] - or set -l theme_git_default_branches master main + or set -l theme_git_default_branches master main (git config init.defaultBranch) [ "$theme_display_git_master_branch" != 'yes' -a "$theme_display_git_default_branch" != 'yes' ] and contains $branch $theme_git_default_branches