mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
feat: Add ability for command duration in milliseconds (#380)
This commit is contained in:
@@ -212,7 +212,7 @@ use_symbol_for_status = true
|
||||
## Command Duration
|
||||
|
||||
The `cmd_duration` module shows how long the last command took to execute.
|
||||
The module will be shown only if the command took longer than two seconds, or
|
||||
The module will be shown only if the command took longer than 2000 milliseconds (2 seconds), or
|
||||
the `min_time` config value, if it exists.
|
||||
|
||||
::: warning Do not hook the DEBUG trap in Bash
|
||||
@@ -227,11 +227,11 @@ running `eval $(starship init $0)`, and then proceed as normal.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ----------------------------------- |
|
||||
| `min_time` | `2` | Shortest duration to show time for. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `cmd_duration` module. |
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ----------------------------------------------------- |
|
||||
| `min_time` | `2000` | Shortest duration to show time for (in milliseconds). |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `cmd_duration` module. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -239,7 +239,7 @@ running `eval $(starship init $0)`, and then proceed as normal.
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 4
|
||||
min_time = 4000
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
Reference in New Issue
Block a user