mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
fix(init): Change Nushell init for nu 0.60 (#3773)
This commit is contained in:
+12
-3
@@ -1,8 +1,17 @@
|
||||
let-env STARSHIP_SHELL = "nu"
|
||||
let-env STARSHIP_SESSION_KEY = (random chars -l 16)
|
||||
let-env PROMPT_MULTILINE_INDICATOR = (^::STARSHIP:: prompt --continuation)
|
||||
|
||||
def starship_prompt [] {
|
||||
# Does not play well with default character module.
|
||||
# TODO: Also Use starship vi mode indicators?
|
||||
let-env PROMPT_INDICATOR = ""
|
||||
|
||||
let-env PROMPT_COMMAND = {
|
||||
# jobs are not supported
|
||||
# status is not supported
|
||||
^::STARSHIP:: prompt --cmd-duration $nu.env.CMD_DURATION_MS
|
||||
^::STARSHIP:: prompt --cmd-duration $env.CMD_DURATION_MS --status $env.LAST_EXIT_CODE
|
||||
}
|
||||
|
||||
# Not well-suited for `starship prompt --right`.
|
||||
# Built-in right prompt is equivalent to $fill$right_format in the first prompt line.
|
||||
# Thus does not play well with default `add_newline = True`.
|
||||
let-env PROMPT_COMMAND_RIGHT = {''}
|
||||
|
||||
Reference in New Issue
Block a user