mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
feat(nu): validate existence of history.txt
This commit is contained in:
parent
70fa0bffca
commit
134f7013cf
|
@ -23,7 +23,7 @@ $env.PROMPT_MULTILINE_INDICATOR = (^::OMP:: print secondary $"--config=($env.POS
|
|||
$env.PROMPT_COMMAND = { ||
|
||||
# hack to set the cursor line to 1 when the user clears the screen
|
||||
# this obviously isn't bulletproof, but it's a start
|
||||
let clear = (history | last 1 | get 0.command) == "clear"
|
||||
let clear = (history | is-empty) or ((history | last 1 | get 0.command) == "clear")
|
||||
|
||||
^::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)"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue