diff options
author | Aaron Gable <aaron@aarongable.com> | 2020-11-23 10:22:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 19:22:51 +0100 |
commit | 4b85b40cb0af9e8c5eecdcf8931073f3c9e8779d (patch) | |
tree | db56a3312ce135443416c3f61ab8e33d5bf82421 /docs | |
parent | 29117c4817795f844ca2b1631a40ead672ed3f86 (diff) |
feat(git_branch): add 'only_attached' config bool (#1910)
* feat(git_branch): add 'only_attached' config bool
This adds a new boolean, `only_attached`, to the configuration for
the `git_branch` module. This mirrors the `only_detached` config
value for the `git_commit` module: setting the value to true causes
the module to suppress its output when the user is not on a branch.
This allows users to have either a branch name or a commit hash in
their prompt, as opposed to having either a branch name or the
overly-wordy "HEAD (sha1)".
* Fix formatting
Diffstat (limited to 'docs')
-rw-r--r-- | docs/config/README.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index d1a81b7a8..122ca6e28 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1030,6 +1030,7 @@ The `git_branch` module shows the active branch of the repo in your current dire | `style` | `"bold purple"` | The style for the module. | | `truncation_length` | `2^63 - 1` | Truncates a git branch to X graphemes. | | `truncation_symbol` | `"…"` | The symbol used to indicate a branch name was truncated. You can use `""` for no symbol. | +| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. | | `disabled` | `false` | Disables the `git_branch` module. | ### Variables |