mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(git_commit): add git tag to module (#950)
This commit is contained in:
committed by
GitHub
parent
c938eac1d6
commit
ea9f803018
+11
-8
@@ -1043,17 +1043,19 @@ truncation_symbol = ""
|
||||
|
||||
## Git Commit
|
||||
|
||||
The `git_commit` module shows the current commit hash of the repo in your current directory.
|
||||
The `git_commit` module shows the current commit hash and also the tag (if any) of the repo in your current directory.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ------------------------ | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `'[\($hash\)]($style) '` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ---------------------------------------------- | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `format` | `"[\\($hash\\)]($style) [\\($tag\\)]($style)"` | The format for the module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `only_detached` | `true` | Only show git commit hash when in detached HEAD state |
|
||||
| `tag_disabled` | `true` | Disables showing tag info in `git_commit` module. |
|
||||
| `tag_symbol` | `"🏷 "` | Tag symbol prefixing the info shown |
|
||||
| `disabled` | `false` | Disables the `git_commit` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1071,6 +1073,7 @@ The `git_commit` module shows the current commit hash of the repo in your curren
|
||||
|
||||
[git_commit]
|
||||
commit_hash_length = 4
|
||||
tag_symbol = "🔖 "
|
||||
```
|
||||
|
||||
## Git State
|
||||
|
||||
Reference in New Issue
Block a user