diff options
author | Texas Toland <texastoland@gmail.com> | 2024-03-21 06:38:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 12:38:38 +0100 |
commit | d308e918ee014f4ca9976683e79e819afd8160f7 (patch) | |
tree | c5ef10460030aa39f93b5c727e783b0a8f1d5824 | |
parent | ae4618996b624d32b7d3e7cf4e5ecde2b174e78c (diff) |
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.
-rw-r--r-- | src/init/starship.nu | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/init/starship.nu b/src/init/starship.nu index 0601e1806..762569a33 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 |