config dump
This commit is contained in:
parent
72b07bd11f
commit
25483702ac
9 changed files with 1416 additions and 208 deletions
44
nushell/starship.nu
Normal file
44
nushell/starship.nu
Normal file
|
@ -0,0 +1,44 @@
|
|||
# this file is both a valid
|
||||
# - 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 { $env.STARSHIP_SHELL = "nu"; load-env {
|
||||
STARSHIP_SESSION_KEY: (random chars -l 16)
|
||||
PROMPT_MULTILINE_INDICATOR: (
|
||||
^/run/current-system/sw/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
|
||||
(
|
||||
^/run/current-system/sw/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: {||
|
||||
(
|
||||
^/run/current-system/sw/bin/starship prompt
|
||||
--right
|
||||
--cmd-duration $env.CMD_DURATION_MS
|
||||
$"--status=($env.LAST_EXIT_CODE)"
|
||||
--terminal-width (term size).columns
|
||||
)
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
def create_left_prompt [] {
|
||||
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue