feat(git_commit): add git tag to module (#950)

This commit is contained in:
Miguel Ángel Melón Pérez
2020-10-23 17:49:19 +02:00
committed by GitHub
parent c938eac1d6
commit ea9f803018
4 changed files with 157 additions and 11 deletions
+11 -8
View File
@@ -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