mirror of
https://github.com/nushell/nushell.git
synced 2025-04-29 15:44:28 +02:00
Add env-conversions helpers to std (#15569)
When combined with [the Cookbook update](https://github.com/nushell/nushell.github.io/pull/1878), this resolves #15452 # Description When we removed the startup `ENV_CONVERSION` for path, as noted in the issue above, we removed the ability for users to access this closure for other purposes. This PR adds the PATH closures back as a `std` commands that outputs a record of closures (similar to `ENV_CONVERSIONS`). # User-Facing Changes Doc will be updated and users can once again easily access `direnv` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting Doc PR to be merged when released in 0.104
This commit is contained in:
parent
03d455a688
commit
a9657e17ad
@ -133,3 +133,13 @@ export def light-theme [] {
|
||||
shape_raw_string: light_purple
|
||||
}
|
||||
}
|
||||
|
||||
# Returns helper closures that can be used for ENV_CONVERSIONS and other purposes
|
||||
export def env-conversions [] {
|
||||
{
|
||||
"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) }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user