diff --git a/README.md b/README.md index 092f0c0..adb1f69 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ set -g theme_display_git_untracked no set -g theme_display_git_ahead_verbose yes set -g theme_display_git_dirty_verbose yes set -g theme_display_git_stashed_verbose yes -set -g theme_display_git_master_branch yes +set -g theme_display_git_default_branch yes +set -g theme_git_default_branches master main set -g theme_git_worktree_support yes set -g theme_use_abbreviated_branch_name yes set -g theme_display_vagrant yes @@ -108,11 +109,10 @@ set -g theme_project_dir_length 1 set -g theme_newline_cursor yes set -g theme_newline_prompt '$ ' ``` -**GIT options** +**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. +- `theme_display_git_default_branch`. By default theme will hide/collapse the branch name in your prompt when you are using a Git _default branch_ i.e. historically `master` and often `main` now. Set to `yes` to stop these branches from being hidden/collapsed. +- `theme_git_default_branches`. The big cloud repos (GitHub, Bitbucket, GitLab et al.) are moving away from using `master` as the default branch name, and allow you to choose your own. As of version **2.28**, Git also supports custom default branch names via the `init.defaultBranch` config option. If our defaults of `master main` don't suit you, you can add/remove names in thist list i.e. `main trunk`. This ensures correct hiding/collapsing behaviour with custom default branch names (unless option above is activated). **Title options** diff --git a/fish_prompt.fish b/fish_prompt.fish index 3d4f2f7..020069c 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -23,7 +23,8 @@ # set -g theme_display_git_ahead_verbose yes # set -g theme_display_git_dirty_verbose yes # set -g theme_display_git_stashed_verbose yes -# set -g theme_display_git_master_branch yes +# set -g theme_display_git_default_branch yes +# set -g theme_git_default_branches main trunk # set -g theme_git_worktree_support yes # set -g theme_display_vagrant yes # set -g theme_display_docker_machine no