diff --git a/home-manager/modules/nushell/config.nu b/home-manager/modules/nushell/config.nu index 490be07..161a368 100644 --- a/home-manager/modules/nushell/config.nu +++ b/home-manager/modules/nushell/config.nu @@ -12,7 +12,7 @@ let dark_theme = { empty: blue # Closures can be used to choose colors for specific values. # The value (in this case, a bool) is piped into the closure. - bool: { if $in { 'light_cyan' } else { 'light_gray' } } + bool: {|| if $in { 'light_cyan' } else { 'light_gray' } } int: white filesize: {|e| if $e == 0b { @@ -22,7 +22,7 @@ let dark_theme = { } else { 'blue' } } duration: white - date: { (date now) - $in | + date: {|| (date now) - $in | if $in < 1hr { 'red3b' } else if $in < 6hr { @@ -208,10 +208,10 @@ let-env config = { render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. hooks: { - pre_prompt: [{ + pre_prompt: [{|| null }] - pre_execution: [{ + pre_execution: [{|| null # replace with source code to run before the repl input is run }] env_change: { @@ -219,7 +219,7 @@ let-env config = { null # replace with source code to run if the PWD environment is different since the last repl input }] } - display_output: { + display_output: {|| if (term size).columns >= 100 { table -e } else { table } } } diff --git a/home-manager/modules/nushell/env.nu b/home-manager/modules/nushell/env.nu index 4044461..78c71fc 100644 --- a/home-manager/modules/nushell/env.nu +++ b/home-manager/modules/nushell/env.nu @@ -2,10 +2,10 @@ # The prompt indicators are environmental variables that represent # the state of the prompt -let-env PROMPT_INDICATOR = { "> " } -let-env PROMPT_INDICATOR_VI_INSERT = { ": " } -let-env PROMPT_INDICATOR_VI_NORMAL = { "> " } -let-env PROMPT_MULTILINE_INDICATOR = { "::: " } +let-env PROMPT_INDICATOR = {|| "> " } +let-env PROMPT_INDICATOR_VI_INSERT = {|| ": " } +let-env PROMPT_INDICATOR_VI_NORMAL = {|| "> " } +let-env PROMPT_MULTILINE_INDICATOR = {|| "::: " } # Specifies how environment variables are: # - converted from a string to a value on Nushell startup (from_string)