mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(git_branch): add remote branch name if different than local branch (#1915)
* feat(git_branch): add remote branch name if different than local branch * feat(git_branch): Implement a more customizable remote branch * feat(git_branch): Use more explicit API function name * feat(git_branch): Remove forgotten draft documentation * feat(git_branch): Set less verbose defaults * feat(git_branch): Handle case to always display remote * feat(git_branch): Fix error in rebase operation
This commit is contained in:
@@ -1025,6 +1025,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `always_show_remote`| `false` | Shows the remote tracking branch name, even if it is equal to the local branch name. |
|
||||
| `format` | `"on [$symbol$branch]($style) "` | The format for the module. Use `"$branch"` to refer to the current branch name. |
|
||||
| `symbol` | `" "` | A format string representing the symbol of git branch. |
|
||||
| `style` | `"bold purple"` | The style for the module. |
|
||||
@@ -1038,6 +1039,7 @@ The `git_branch` module shows the active branch of the repo in your current dire
|
||||
| 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` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user