Check for starship to avoid errors with nushell config
This commit is contained in:
parent
bb2c8961e0
commit
3ee649b211
@ -2,11 +2,13 @@
|
||||
#{{- /* vim: set filetype=nu: */ -}}
|
||||
# Nushell Environment Config File
|
||||
|
||||
#{{ if lookPath "starship" -}}
|
||||
def command_prompt [] {(
|
||||
starship prompt
|
||||
$'--cmd-duration=($env.CMD_DURATION_MS)'
|
||||
$'--status=($env.LAST_EXIT_CODE)'
|
||||
)}
|
||||
#{{- end }}
|
||||
|
||||
def add_xdg [name ...parts] {
|
||||
if $name in $env {
|
||||
@ -88,7 +90,9 @@ load-env {
|
||||
| uniq)
|
||||
|
||||
PROMPT_COMMAND_RIGHT: ""
|
||||
#{{ if lookPath "starship" -}}
|
||||
PROMPT_COMMAND: {|| command_prompt }
|
||||
#{{- end }}
|
||||
|
||||
PROMPT_INDICATOR: ""
|
||||
PROMPT_INDICATOR_VI_INSERT: ": "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user