nushell: Update config to be compatible with 0.78.0

This commit is contained in:
Erwin Boskma 2023-04-07 10:52:49 +02:00
parent 0fd19dd3dd
commit 180448b5b6
Signed by: erwin
SSH key fingerprint: SHA256:Vw4O4qA0i5x65Y7yyjDpWDCSMSXAhqT4X7cJ3frdnLY
2 changed files with 9 additions and 9 deletions

View file

@ -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 }
}
}

View file

@ -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)