nushell: allow arbitrary environment variables

This commit is contained in:
Joaquín Triñanes 2024-09-14 18:09:15 +02:00 committed by Robert Helgesson
parent edf15f1549
commit 628b15d275
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
3 changed files with 47 additions and 9 deletions

View file

@ -1,4 +1,17 @@
$env.FOO = 'BAR'
$env.BAR = $'(echo BAZ)'
load-env {
"ENV_CONVERSIONS": {
"PATH": {
"from_string": ({|s| $s | split row (char esep) })
"to_string": ({|v| $v | str join (char esep) })
}
}
"FOO": "BAR"
"LIST_VALUE": [
"foo"
"bar"
]
"PROMPT_COMMAND": ({|| "> "})
}