2021-07-04 21:32:58 +02:00
|
|
|
let-env STARSHIP_SHELL = "nu"
|
2021-07-10 12:14:42 +02:00
|
|
|
let-env STARSHIP_SESSION_KEY = (random chars -l 16)
|
2022-03-24 20:06:24 +01:00
|
|
|
let-env PROMPT_MULTILINE_INDICATOR = (^::STARSHIP:: prompt --continuation)
|
2021-07-04 21:32:58 +02:00
|
|
|
|
2022-03-24 20:06:24 +01:00
|
|
|
# Does not play well with default character module.
|
|
|
|
# TODO: Also Use starship vi mode indicators?
|
|
|
|
let-env PROMPT_INDICATOR = ""
|
|
|
|
|
|
|
|
let-env PROMPT_COMMAND = {
|
2021-07-04 21:32:58 +02:00
|
|
|
# jobs are not supported
|
2022-10-22 12:17:33 +00:00
|
|
|
let width = (term size).columns
|
2022-04-04 20:03:43 +02:00
|
|
|
^::STARSHIP:: prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
2021-07-04 21:32:58 +02:00
|
|
|
}
|
2022-03-24 20:06:24 +01:00
|
|
|
|
|
|
|
# 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 = {''}
|