mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 13:57:26 -08:00
parent
3948bef0b2
commit
66a55991f1
|
@ -1,16 +1,17 @@
|
||||||
let-env POWERLINE_COMMAND = 'oh-my-posh'
|
export-env {
|
||||||
let-env POSH_THEME = ::CONFIG::
|
let-env POWERLINE_COMMAND = 'oh-my-posh'
|
||||||
let-env PROMPT_INDICATOR = ""
|
let-env POSH_THEME = ::CONFIG::
|
||||||
# By default displays the right prompt on the first line
|
let-env PROMPT_INDICATOR = ""
|
||||||
# making it annoying when you have a multiline prompt
|
# By default displays the right prompt on the first line
|
||||||
# making the behavior different compared to other shells
|
# making it annoying when you have a multiline prompt
|
||||||
let-env PROMPT_COMMAND_RIGHT = {''}
|
# making the behavior different compared to other shells
|
||||||
let-env NU_VERSION = (version | get version)
|
let-env PROMPT_COMMAND_RIGHT = {''}
|
||||||
|
let-env NU_VERSION = (version | get version)
|
||||||
|
|
||||||
# PROMPTS
|
# PROMPTS
|
||||||
let-env PROMPT_MULTILINE_INDICATOR = (^::OMP:: print secondary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)")
|
let-env PROMPT_MULTILINE_INDICATOR = (^::OMP:: print secondary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)")
|
||||||
|
|
||||||
let-env PROMPT_COMMAND = {
|
let-env PROMPT_COMMAND = {
|
||||||
# We have to do this because the initial value of `$env.CMD_DURATION_MS` is always `0823`,
|
# We have to do this because the initial value of `$env.CMD_DURATION_MS` is always `0823`,
|
||||||
# which is an official setting.
|
# which is an official setting.
|
||||||
# See https://github.com/nushell/nushell/discussions/6402#discussioncomment-3466687.
|
# See https://github.com/nushell/nushell/discussions/6402#discussioncomment-3466687.
|
||||||
|
@ -18,4 +19,5 @@ let-env PROMPT_COMMAND = {
|
||||||
|
|
||||||
let width = (term size -c | get columns | into string)
|
let width = (term size -c | get columns | into string)
|
||||||
^::OMP:: print primary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)" $"--execution-time=($cmd_duration)" $"--error=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
^::OMP:: print primary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)" $"--execution-time=($cmd_duration)" $"--error=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ Once altered, reload your config for the changes to take effect.
|
||||||
<TabItem value="nu">
|
<TabItem value="nu">
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
Oh My Posh requires Nushell v0.60.0 or higher.
|
Oh My Posh requires Nushell v0.68.1 or higher.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Run the following command:
|
Run the following command:
|
||||||
|
|
|
@ -153,7 +153,7 @@ exec fish
|
||||||
<TabItem value="nu">
|
<TabItem value="nu">
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
Oh My Posh requires Nushell v0.60.0 or higher.
|
Oh My Posh requires Nushell v0.68.1 or higher.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Run the following command:
|
Run the following command:
|
||||||
|
|
Loading…
Reference in a new issue