diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /config/nushell/starship.nu | |
Diffstat (limited to 'config/nushell/starship.nu')
| -rwxr-xr-x | config/nushell/starship.nu | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/config/nushell/starship.nu b/config/nushell/starship.nu new file mode 100755 index 0000000..8bef494 --- /dev/null +++ b/config/nushell/starship.nu @@ -0,0 +1,35 @@ +export-env { $env.STARSHIP_SHELL = "nu"; load-env { + STARSHIP_SESSION_KEY: (random chars -l 16) + PROMPT_MULTILINE_INDICATOR: ( + ^/etc/profiles/per-user/coast/bin/starship prompt --continuation + ) + + # Does not play well with default character module. + # TODO: Also Use starship vi mode indicators? + PROMPT_INDICATOR: "" + + PROMPT_COMMAND: {|| + # jobs are not supported + ( + ^/etc/profiles/per-user/coast/bin/starship prompt + --cmd-duration $env.CMD_DURATION_MS + $"--status=($env.LAST_EXIT_CODE)" + --terminal-width (term size).columns + ) + } + + config: ($env.config? | default {} | merge { + render_right_prompt_on_last_line: true + }) + + PROMPT_COMMAND_RIGHT: {|| + ( + ^/etc/profiles/per-user/coast/bin/starship prompt + --right + --cmd-duration $env.CMD_DURATION_MS + $"--status=($env.LAST_EXIT_CODE)" + --terminal-width (term size).columns + ) + } +}} + |
