From e6c5571fc9c1f47c711d5fcdd1799ced5b546454 Mon Sep 17 00:00:00 2001 From: Martin Slot Date: Sat, 11 Feb 2023 14:05:39 +0100 Subject: [PATCH] fix: let-env warning when using nushell (#4893) Fixed a startup error, when using nushell. The nushell warns about not using `let-env` for configuring `config`. I have removed the `load-env` and just added a `let-env` for the `config` as the documentation recommends: https://www.nushell.sh/book/environment.html#let-env --- src/init/starship.nu | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/init/starship.nu b/src/init/starship.nu index f5223558..7d879bee 100644 --- a/src/init/starship.nu +++ b/src/init/starship.nu @@ -15,12 +15,11 @@ let-env PROMPT_COMMAND = { # Whether we have config items let has_config_items = (not ($env | get -i config | is-empty)) -let config = if $has_config_items { +let-env config = if $has_config_items { $env.config | upsert render_right_prompt_on_last_line true } else { {render_right_prompt_on_last_line: true} } -{config: $config} | load-env let-env PROMPT_COMMAND_RIGHT = { let width = (term size).columns