From 217e2521687f4b08c6698639bf29631468d2225d Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Thu, 18 Jun 2020 01:10:48 +0200 Subject: [PATCH] Enable hiding default branch names other than 'master' --- fish_prompt.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fish_prompt.fish b/fish_prompt.fish index 4c47f7f..455708d 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -82,6 +82,10 @@ function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish and echo $branch_glyph and return + [ "$theme_display_git_default_branch" != 'yes' -a "$ref" = "refs/heads/$theme_git_default_branch" ] + and echo $branch_glyph + and return + # truncate the middle of the branch name, but only if it's 25+ characters set -l truncname $ref [ "$theme_use_abbreviated_branch_name" = 'yes' ]