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:
Sagittarius-a
2020-11-23 22:07:16 +01:00
committed by GitHub
parent cf297ff25d
commit 688f1b3457
4 changed files with 48 additions and 4 deletions
+2
View File
@@ -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` |