mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(git_branch): show remote name (#1972)
* feat(git_branch): Show remote name in addition to remote branch * feat(git_branch): Fix table indentation in config README * feat(git_branch): Use a different method to fetch remote information * feat(git_branch): Fix the Clippy issue regarding string constant
This commit is contained in:
@@ -1031,17 +1031,18 @@ 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. |
|
||||
| `only_attached` | `false` | Only show the branch name when not in a detached HEAD state. |
|
||||
| `disabled` | `false` | Disables the `git_branch` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). |
|
||||
| remote | `master` | The remote branch name. |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| ----------------| -------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| branch | `master` | The current branch name, falls back to `HEAD` if there's no current branch (e.g. git detached HEAD). |
|
||||
| remote_name | `origin` | The remote name. |
|
||||
| remote_branch | `master` | The name of the branch tracked on `remote_name`. |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user