diff options
author | Samir Talwar <samir@functional.computer> | 2023-04-05 07:53:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 07:53:06 +0200 |
commit | 041a51835371d3738cc7b597b4a506a5dc4341c9 (patch) | |
tree | c03212b1cb3b0c05a4872225b1b1a591af9947d5 | |
parent | 6ea8b5ec1b6c14dbef930b13cb1925fb1f6e9336 (diff) |
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.
-rw-r--r-- | src/init/starship.nu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init/starship.nu b/src/init/starship.nu index 7d879beed..fd8729d29 100644 --- a/src/init/starship.nu +++ b/src/init/starship.nu @@ -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)" } |