mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
direnv: update nushell env conversion logic (#7015)
This commit is contained in:
@@ -186,8 +186,13 @@ in
|
||||
| default {}
|
||||
| items {|key, value|
|
||||
let value = do (
|
||||
$env.ENV_CONVERSIONS?
|
||||
| default {}
|
||||
{
|
||||
"path": {
|
||||
from_string: {|s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: {|v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
| merge ($env.ENV_CONVERSIONS? | default {})
|
||||
| get -i $key
|
||||
| get -i from_string
|
||||
| default {|x| $x}
|
||||
|
||||
Reference in New Issue
Block a user