diff --git a/crates/nu-utils/src/default_files/default_env.nu b/crates/nu-utils/src/default_files/default_env.nu index 1f702d984b..cb85e519ba 100644 --- a/crates/nu-utils/src/default_files/default_env.nu +++ b/crates/nu-utils/src/default_files/default_env.nu @@ -3,7 +3,7 @@ # # version = "0.100.1" -$env.PROMPT_COMMAND = {|| +$env.PROMPT_COMMAND = $env.PROMPT_COMMAND? | default {|| let dir = match (do -i { $env.PWD | path relative-to $nu.home-path }) { null => $env.PWD '' => '~' @@ -17,12 +17,12 @@ $env.PROMPT_COMMAND = {|| $path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)" } -$env.PROMPT_INDICATOR = "> " -$env.PROMPT_INDICATOR_VI_NORMAL = "> " -$env.PROMPT_INDICATOR_VI_INSERT = ": " -$env.PROMPT_MULTILINE_INDICATOR = "::: " +$env.PROMPT_INDICATOR = $env.PROMPT_INDICATOR? | default "> " +$env.PROMPT_INDICATOR_VI_NORMAL = $env.PROMPT_INDICATOR_VI_NORMAL? | default "> " +$env.PROMPT_INDICATOR_VI_INSERT = $env.PROMPT_INDICATOR_VI_INSERT? | default ": " +$env.PROMPT_MULTILINE_INDICATOR = $env.PROMPT_MULTILINE_INDICATOR? | default "::: " -$env.PROMPT_COMMAND_RIGHT = {|| +$env.PROMPT_COMMAND_RIGHT = $env.PROMPT_COMMAND_RIGHT? | default {|| # create a right prompt in magenta with green separators and am/pm underlined let time_segment = ([ (ansi reset) @@ -47,11 +47,11 @@ $env.ENV_CONVERSIONS = { } } -$env.NU_LIB_DIRS = [ +$env.NU_LIB_DIRS = $env.NU_LIB_DIRS? | default [ ($nu.default-config-dir | path join 'scripts') # add /scripts ($nu.data-dir | path join 'completions') # default home for nushell completions ] -$env.NU_PLUGIN_DIRS = [ +$env.NU_PLUGIN_DIRS = $env.NU_PLUGIN_DIRS | default [ ($nu.default-config-dir | path join 'plugins') # add /plugins -] \ No newline at end of file +]