mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
parent
0e45aa5997
commit
8eb8d88a20
|
@ -28,6 +28,10 @@ $env.PROMPT_COMMAND = { ||
|
|||
$clear = (history | is-empty) or ((history | last 1 | get 0.command) == "clear")
|
||||
}
|
||||
|
||||
if ($env.SET_POSHCONTEXT? | is-not-empty) {
|
||||
do --env $env.SET_POSHCONTEXT
|
||||
}
|
||||
|
||||
^::OMP:: print primary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.POSH_SHELL_VERSION)" $"--execution-time=(posh_cmd_duration)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=(posh_width)" $"--cleared=($clear)"
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,15 @@ function set_poshcontext
|
|||
end
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="nu">
|
||||
|
||||
```bash
|
||||
$env.SET_POSHCONTEXT = {
|
||||
$env.POSH = ( date now );
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
|
Loading…
Reference in a new issue