From d308e918ee014f4ca9976683e79e819afd8160f7 Mon Sep 17 00:00:00 2001 From: Texas Toland Date: Thu, 21 Mar 2024 06:38:38 -0500 Subject: [PATCH] fix(nu): continuation prompt not being displayed correctly (#5851) Resolve #5847 by initializing `$env.STARSHIP_SHELL` before calling `starship` Most minimal change possible. Other simplification are possible but not know to be backwards compatible. Also considered `with-env` or `STARSHIP_SHELL=nu starship` but they'd be worse. Happy to reformat indentation if desired. --- 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 0601e180..762569a3 100644 --- a/src/init/starship.nu +++ b/src/init/starship.nu @@ -2,8 +2,7 @@ # - overlay which can be loaded with `overlay use starship.nu` # - module which can be used with `use starship.nu` # - script which can be used with `source starship.nu` -export-env { load-env { - STARSHIP_SHELL: "nu" +export-env { $env.STARSHIP_SHELL = "nu"; load-env { STARSHIP_SESSION_KEY: (random chars -l 16) PROMPT_MULTILINE_INDICATOR: ( ^::STARSHIP:: prompt --continuation