diff --git a/README.md b/README.md index 381fb89..092f0c0 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,11 @@ set -g theme_project_dir_length 1 set -g theme_newline_cursor yes set -g theme_newline_prompt '$ ' ``` +**GIT options** + +Note that `master` and `main` now behave in the same way i.e. they +are hidden/collapsed by default. Set the `theme_display_git_master_branch` +override to `yes` (see above) to see these branches. **Title options** diff --git a/fish_prompt.fish b/fish_prompt.fish index 6121652..c09dfea 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -78,7 +78,7 @@ end function __bobthefish_git_branch -S -d 'Get the current git branch (or commitish)' set -l ref (command git symbolic-ref HEAD 2>/dev/null) and begin - [ "$theme_display_git_master_branch" != 'yes' -a "$ref" = 'refs/heads/master' ] + [ "$theme_display_git_master_branch" != 'yes' -a \( "$ref" = 'refs/heads/master' -o "$ref" = 'refs/heads/main' \) ] and echo $branch_glyph and return