mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(git_commit): Show the hash of commits when detached HEAD (#738)
This commit is contained in:
+8
-15
@@ -493,22 +493,16 @@ truncation_symbol = ""
|
||||
|
||||
The `git_commit` module shows the current commit hash of the repo in your current directory.
|
||||
|
||||
::: tip
|
||||
|
||||
This module is disabled by default.
|
||||
To enable it, set `disabled` to `false` in your configuration file.
|
||||
|
||||
:::
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| -------------------- | -------------- | ------------------------------------------------ |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `prefix` | `"("` | Prefix to display immediately before git commit. |
|
||||
| `suffix` | `")"` | Suffix to display immediately after git commit. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
| `disabled` | `true` | Disables the `git_commit` module. |
|
||||
| Variable | Default | Description |
|
||||
| -------------------- | -------------- | ----------------------------------------------------- |
|
||||
| `commit_hash_length` | `7` | The length of the displayed git commit hash. |
|
||||
| `prefix` | `"("` | Prefix to display immediately before git commit. |
|
||||
| `suffix` | `")"` | Suffix to display immediately after git commit. |
|
||||
| `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. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -516,7 +510,6 @@ To enable it, set `disabled` to `false` in your configuration file.
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[git_commit]
|
||||
disabled = false
|
||||
commit_hash_length = 4
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user