mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
c9e9b138eb
# Description Work for #7149 - **Error `with-env` given uneven count in list form** - **Fix `with-env` `CantConvert` to record** - **Error `with-env` when given protected env vars** - **Deprecate list/table input of vars to `with-env`** - **Remove examples for deprecated input** # User-Facing Changes ## Deprecation of the following forms ``` > with-env [MYENV "my env value"] { $env.MYENV } my env value > with-env [X Y W Z] { $env.X } Y > with-env [[X W]; [Y Z]] { $env.W } Z ``` ## recommended standardized form ``` # Set by key-value record > with-env {X: "Y", W: "Z"} { [$env.X $env.W] } ╭───┬───╮ │ 0 │ Y │ │ 1 │ Z │ ╰───┴───╯ ``` ## (Side effect) Repeated definitions in an env shorthand are now disallowed ``` > FOO=bar FOO=baz $env Error: nu:🐚:column_defined_twice × Record field or table column used twice: FOO ╭─[entry #1:1:1] 1 │ FOO=bar FOO=baz $env · ─┬─ ─┬─ · │ ╰── field redefined here · ╰── field first defined here ╰──── ``` |
||
---|---|---|
.. | ||
tests | ||
command.rs | ||
config_files.rs | ||
ide.rs | ||
logger.rs | ||
main.rs | ||
README.md | ||
run.rs | ||
signals.rs | ||
terminal.rs | ||
test_bins.rs | ||
tests.rs |
Nushell REPL
This directory contains the main Nushell REPL (read eval print loop) as part of the CLI portion of Nushell, which creates the nu
binary itself.
Current versions of the nu
binary will use the Nu argument parsing logic to parse the commandline arguments passed to nu
, leaving the logic here to be a thin layer around what the core libraries.