mirror of
https://github.com/nushell/nushell.git
synced 2026-11-20 18:56:12 +08:00
## Description
This removes everything deprecated in 0.112 or earlier (April 2026 or
before), along with the stubs left from the 2023 removals. It also
removes `ast::Call::positional_nth` and `positional_len`, which were
deprecated in 0.113 and have no in-tree users. Everything else
deprecated in 0.113 or later stays: `watch` with a closure, `str
upcase`/`str downcase`, `ShellError::Return`, `tui label --title`, and
`update cells --columns`.
Commands and flags are deleted outright instead of being turned into
stubs. Most removed names still lead to their replacement through
existing search terms: `filter` suggests `where`, `benchmark` suggests
`timeit`, `fetch` suggests `http get`, and `post` suggests `http post`.
`default $closure` keeps its current behavior. The deprecation warning
promised that closures passed by variable would become lazy, but making
that change would be a new break. So the promise goes away instead: a
closure literal (`default { ... }`) is evaluated lazily, and a closure
passed directly as `$var` is the default value itself. The help text now
says this.
`CustomValue::is_iterable()` is no longer deprecated. Its deprecation
note promised a replacement that was never built, and the SQLite query
builder still depends on it.
## User-facing changes (Release notes)
- Removed `--ignore-errors (-i)` from `get`, `select`, and `reject`. Use
`--optional (-o)`.
- Removed `get --sensitive (-s)`. Cell paths are case-sensitive by
default. Add `!` after a member to make it case-insensitive.
- Removed `filter`. Use `where`, which takes the same closures,
including one stored in a variable.
- Removed the `positional` option from custom completer results. Use
`completion_algorithm: substring` instead. A completer that still
returns `positional: false` now gets prefix matching.
- `default` no longer warns when its closure is passed directly as
`$var`. That closure is used as the default value, while a closure
literal is still evaluated lazily.
- Deleted the `date format` and `let-env` stubs and the removal hints
for `fetch`, `post`, and `benchmark`. All of these were removed in 2023.
`let-env FOO = 1` now fails with "Assignment operations require a
variable", and `date format '%Y'` with "Extra positional argument". Use
`$env.FOO = 1` and `format date`.
- Nushell no longer converts a pre-0.93 `plugin.nu` into
`plugin.msgpackz`. A setup that has only `plugin.nu` starts with no
plugins. Register them again with `plugin add`.
### Breaking changes for plugin authors
- `ShellError::GenericError` is removed. Use
`ShellError::Generic(GenericError)`.
- `PipelineData::metadata()` is removed. Use `metadata_ref()`,
`metadata_mut()`, or `take_metadata()`.
- `EngineState::current_work_dir()` and `StateWorkingSet::get_cwd()` are
removed. Use `EngineState::cwd()` or `cwd_as_string()`.
- `ast::Call::positional_nth()` and `positional_len()` are removed. Use
`positional_iter()`.
- The unused `ShellError::DeprecationWarning` is removed.
- `CustomValue::is_iterable()` is no longer deprecated.
## Additional notes
<!--
Optional.
Examples:
- fixes #123
- closes #456
- related #789
Anything else reviewers should know.
Remove this section if not needed.
-->
run the scripts
Note
the following table must be read as follows:
- an
xmeans it works- a
?means no data available
.nuscripts must be run asnu .../foo.nu
.shscripts must be run as./.../foo.sh
.ps1scripts must be run aspowershell .../foo.ps1let's say a script is called
foo
- an
xin the./scriptscolumn meansfoocan be run from./scripts- an
xin the root column meansfoocan be run from the root ofnushell- an
xin the anywhere column meansfoocan be run from anywhere!
| script | ./scripts/ |
root | anywhere |
|---|---|---|---|
build-all-maclin.sh |
x | x | x |
build-all-windows.cmd |
? | x | ? |
coverage-local.sh |
x | x | x |
install-all.ps1 |
? | x | ? |
install-all.sh |
x | x | x |
uninstall-all.sh |
x | x | x |