mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
fix: styling fixes for execution time
This commit is contained in:
parent
d5b41b37b2
commit
552fda014b
|
@ -8,7 +8,9 @@ sidebar_label: Execution Time
|
||||||
|
|
||||||
Displays the execution time of the previously executed command.
|
Displays the execution time of the previously executed command.
|
||||||
|
|
||||||
To use this, use the PowerShell module, or confirm that you are passing an `execution-time` argument contianing the elapsed milliseconds to the oh-my-posh executable. The [installation guide][install] shows how to include this argument for PowerShell and Zsh.
|
To use this, use the PowerShell module, or confirm that you are passing an `execution-time` argument containing the
|
||||||
|
elapsed milliseconds to the oh-my-posh executable.
|
||||||
|
The [installation guide][install] shows how to include this argument for PowerShell and Zsh.
|
||||||
|
|
||||||
## Sample Configuration
|
## Sample Configuration
|
||||||
|
|
||||||
|
@ -46,5 +48,4 @@ Style specifies the format in which the time will be displayed. The table below
|
||||||
| houston | `00:00:00.001` | `00:00:02.1` | `00:03:02.1` | `04:03:02.1` |
|
| houston | `00:00:00.001` | `00:00:02.1` | `00:03:02.1` | `04:03:02.1` |
|
||||||
| amarillo | `0.001s` | `2.1s` | `182.1s` | `14,582.1s` |
|
| amarillo | `0.001s` | `2.1s` | `182.1s` | `14,582.1s` |
|
||||||
|
|
||||||
|
[install]: /docs/installation
|
||||||
[install]: /docs/installation
|
|
||||||
|
|
|
@ -14,18 +14,24 @@ type executiontime struct {
|
||||||
output string
|
output string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DurationStyle how to display the time
|
||||||
type DurationStyle string
|
type DurationStyle string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// ThresholdProperty represents minimum duration (milliseconds) required to enable this segment
|
// ThresholdProperty represents minimum duration (milliseconds) required to enable this segment
|
||||||
ThresholdProperty Property = "threshold"
|
ThresholdProperty Property = "threshold"
|
||||||
|
// Austin milliseconds short
|
||||||
Austin DurationStyle = "austin"
|
Austin DurationStyle = "austin"
|
||||||
|
// Roundrock milliseconds long
|
||||||
Roundrock DurationStyle = "roundrock"
|
Roundrock DurationStyle = "roundrock"
|
||||||
Dallas DurationStyle = "dallas"
|
// Dallas milliseconds full
|
||||||
|
Dallas DurationStyle = "dallas"
|
||||||
|
// Galveston hour
|
||||||
Galveston DurationStyle = "galveston"
|
Galveston DurationStyle = "galveston"
|
||||||
Houston DurationStyle = "houston"
|
// Houston hour and milliseconds
|
||||||
Amarillo DurationStyle = "amarillo"
|
Houston DurationStyle = "houston"
|
||||||
|
// Amarillo seconds
|
||||||
|
Amarillo DurationStyle = "amarillo"
|
||||||
|
|
||||||
second = 1000
|
second = 1000
|
||||||
minute = 60000
|
minute = 60000
|
||||||
|
|
Loading…
Reference in a new issue