Cross segment template properties in transient prompt #3299
|
A pet peeve i have is that the time shown in a prompt is the time that the prompt became available, not when it was submitted. That makes for a not so ideal log. So i though, i could use transient prompts to rewrite part of the prompt upon submission and update the time to the time at which the prompt was submitted. But i'd like to keep other things intact. Since the transient prompt docs tell me However, I do not see the {
"type": "executiontime",
"background": "darkGray",
"foreground": "lightWhite",
"style": "diamond",
"properties": {
"style": "roundrock",
"threshold": 0
},
"template": " \uf608 {{ .FormattedMs }} ",
"trailing_diamond": "\ue0b4"
}and I print whats in the This is on version 12.26.1, the latest version in the Windows store. |
@dcnieho you need
{{ .Segments.Executiontime.FormattedMs }}or{{ .Segments.Executiontime.Ms }}. It saysOutputbecause in that example, the command segment has that property.