mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(git_branch): add 'ignore_branches' option (#3753)
* git-branch: Add option 'ignore_branches' * git-branch: add 'ignore_branches' test * git-branch: comma-separated to toml array * git-branch: update ignore_branches test * git_branch: fix formatting * git-branch: fix formatting again * Initialize ignore_branches as empty Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> * Use iter().any and branch_name as suggested * Fix formatting Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This commit is contained in:
@@ -1374,6 +1374,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
| `truncation_length` | `2^63 - 1` | Truncates a git branch to `N` 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. |
|
||||
| `ignore_branches` | `[]` | A list of names to avoid displaying. Useful for "master" or "main". |
|
||||
| `disabled` | `false` | Disables the `git_branch` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1397,6 +1398,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
symbol = "🌱 "
|
||||
truncation_length = 4
|
||||
truncation_symbol = ""
|
||||
ignore_branches = ["master", "main"]
|
||||
```
|
||||
|
||||
## Git Commit
|
||||
|
||||
Reference in New Issue
Block a user