chore(nu): use updated closure syntax (#5054)
Update starship.nu to conform to Nushell changes Nushell recently made a change to require that all closures have an explicit parameter list, even if it's empty, in https://github.com/nushell/nushell/pull/8290. This updates starship.nu to conform to this requirement. I have casually tested this against both the latest released version of Nushell, and the latest version on HEAD; the changed code works well (for me) on both.
This commit is contained in:
parent
6ea8b5ec1b
commit
041a518353
|
@ -6,7 +6,7 @@ let-env PROMPT_MULTILINE_INDICATOR = (^::STARSHIP:: prompt --continuation)
|
|||
# TODO: Also Use starship vi mode indicators?
|
||||
let-env PROMPT_INDICATOR = ""
|
||||
|
||||
let-env PROMPT_COMMAND = {
|
||||
let-env PROMPT_COMMAND = { ||
|
||||
# jobs are not supported
|
||||
let width = (term size).columns
|
||||
^::STARSHIP:: prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
||||
|
@ -21,7 +21,7 @@ let-env config = if $has_config_items {
|
|||
{render_right_prompt_on_last_line: true}
|
||||
}
|
||||
|
||||
let-env PROMPT_COMMAND_RIGHT = {
|
||||
let-env PROMPT_COMMAND_RIGHT = { ||
|
||||
let width = (term size).columns
|
||||
^::STARSHIP:: prompt --right $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue