Skip to content

Commit

Permalink
Update starship init
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmorganson committed Apr 11, 2024
1 parent bfffdf2 commit eefc49a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions home/dot_config/nushell/scripts/starship.nu
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
# - 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)
PROMPT_MULTILINE_INDICATOR: (
^starship prompt --continuation
)

# Does not play well with default character module.
# TODO: Also Use starship vi mode indicators?
PROMPT_INDICATOR: ""

# TODO: Also Use starship vi mode indicators?
PROMPT_INDICATOR_VI_INSERT: ""
PROMPT_INDICATOR_VI_NORMAL: ""

PROMPT_COMMAND: {||
# jobs are not supported
( starship prompt --cmd-duration $env.CMD_DURATION_MS
(
^starship prompt
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
)
Expand All @@ -28,7 +27,9 @@ export-env { load-env {
})

PROMPT_COMMAND_RIGHT: {||
( starship prompt --right
(
^starship prompt
--right
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
Expand Down

0 comments on commit eefc49a

Please sign in to comment.