nushell: add config.nu, env.nu, starship
This commit is contained in:
parent
e596ca6428
commit
2883e717df
5 changed files with 40 additions and 0 deletions
16
parts/pkgs/extraPackages/nushell/config.nu
Normal file
16
parts/pkgs/extraPackages/nushell/config.nu
Normal file
|
@ -0,0 +1,16 @@
|
|||
let starship_installed = not (which starship | is-empty)
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
}
|
||||
|
||||
|
||||
if $starship_installed {
|
||||
$env.STARSHIP_SHELL = "nu"
|
||||
$env.STARSHIP_SESSION_KEY = (random chars -l 16)
|
||||
$env.STARSHIP_SESSION_KEY = (random chars -l 16)
|
||||
$env.PROMPT_MULTILINE_INDICATOR = (starship prompt --continuation)
|
||||
# $env.PROMPT_INDICATOR = "$ "
|
||||
$env.PROMPT_COMMAND = {|| starship prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" }
|
||||
$env.PROMPT_COMMAND_RIGHT = ''
|
||||
} else {}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue