12071 Commits
Author SHA1 Message Date
Darren Schroeder 6359cda378 bump uu_* crates to 0.12.0 (#19040)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR bumps the uutils/coreutils crates to 0.12.0
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-17 09:42:25 -05:00
Kai Sforza d9f41fbf73 scripts/nix: Update the flake lock (#19038) 2026-09-16 11:42:36 -05:00
Kai Sforza 45aa739595 error make: Allow no text value (#19037) 2026-09-16 11:24:50 -05:00
dependabot[bot]andDarren Schroeder 0667685083 build(deps): bump tango-bench from 0.7.2 to 0.8.0 (#18907)
Bumps [tango-bench](https://github.com/bazhenov/tango) from 0.7.2 to
0.8.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bazhenov/tango/commit/cd8cff90124751ced235361e358a03383137d1c5"><code>cd8cff9</code></a>
0.8.0 Release</li>
<li><a
href="https://github.com/bazhenov/tango/commit/4b00d95446ee375d631af5adf84856a3de86a7d4"><code>4b00d95</code></a>
CI badges added</li>
<li><a
href="https://github.com/bazhenov/tango/commit/9b197e3f8564a052ef334da81b1ff71006e8bc41"><code>9b197e3</code></a>
typo</li>
<li><a
href="https://github.com/bazhenov/tango/commit/29f90f2622d58579c53cb232dcb0e1fca668fe73"><code>29f90f2</code></a>
Increasing number of attempts in the flaky test</li>
<li><a
href="https://github.com/bazhenov/tango/commit/4399a2e0676f6a95cb47202e8fed9a520215006e"><code>4399a2e</code></a>
Change name</li>
<li><a
href="https://github.com/bazhenov/tango/commit/2f6a10ec5737d496e5516e05f629687fbf621cc0"><code>2f6a10e</code></a>
Preventing constant folding optimization in tests</li>
<li><a
href="https://github.com/bazhenov/tango/commit/37ed465f5eb8e7a2890e5410fd81a6a97efff7f7"><code>37ed465</code></a>
Change the name of stage</li>
<li><a
href="https://github.com/bazhenov/tango/commit/5564463e7a6d7f5bb170c455ed6645a97813a7ba"><code>5564463</code></a>
Running nightly on main branch</li>
<li><a
href="https://github.com/bazhenov/tango/commit/bae347560933e3eb4c9b85aaad4be4b21fc65bc5"><code>bae3475</code></a>
Dependencies updated (<a
href="https://redirect.github.com/bazhenov/tango/issues/81">#81</a>)</li>
<li><a
href="https://github.com/bazhenov/tango/commit/71e865d655448fbeb4d51b812d66e123049fa51e"><code>71e865d</code></a>
Get rid of -Zexport-executable-symbols on Windows (<a
href="https://redirect.github.com/bazhenov/tango/issues/80">#80</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bazhenov/tango/compare/v0.7.2...v0.8.0">compare
view</a></li>
</ul>
</details>
<br />

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2026-09-16 09:01:50 -05:00
Darren Schroeder 54f60b88cd update some deps (#19034)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR updates some dependencies that need help.
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-16 07:52:39 -05:00
Luna Dev 4abbd70926 Add structured context support to std/log (#18971)
## Description
This PR adds support for structured context for std/log. 

## User-facing changes (Release notes)
- Adds a `--context` flag to all std/log emitters

Examples:
```
> log info 'hello' --context {user: Ana}
2026-09-05T15:39:01.826|INF|hello user="Ana"
```
2026-09-16 07:51:06 -05:00
Darren Schroeder 7b0b4b9b85 engine: IR-shaped const evaluation for run_const (AST migration phase 2) (#18967)
## Description
This PR is the 3rd installment of trying to keep working toward
minimizing AST and increasing IR.

Runtime block evaluation is already IR-only. Phase 0–1 removed every
`requires_ast_for_arguments` opt-in so IR no longer retains argument AST
for builtins. Const evaluation was still the main holdout:
`eval_const_call` passed an AST `engine::Call`, and `*_const` helpers
forced `assert_ast_call`.

This PR is **phase 2** of the IR-only **call** migration:

1. Bridge — `eval_const_call` evaluates AST args to `Value`s, builds a
temporary `ir::Call` on a `Stack`, and invokes `Command::run_const` with
that IR-shaped call.
2. API — `run_const` now takes `stack: &mut Stack` so IR args are
readable. (this is a breaking api change)
`engine::Call::{has_flag,get_flag,req,rest}_const` work on IR (and still
on AST if needed).
3. `if` — stays on a dedicated AST const path (`eval_const_if`) because
it needs control-flow structure, not flat Values.
4. Blocks as const call args — `Expr::Block` / `Closure` /
`RowCondition` used as *arguments* become capture-free `Closure` values
so commands like `attr example` can extract source text without AST.
5. Cleanup — remove `assert_ast_call`.

Parser AST remains the compile-time intermediate. This does **not**
delete the AST or finish dual-`CallImpl` removal (phases 3–4).

### Breaking changes?

No intentional user-facing breaking changes. Const language behavior
should be unchanged (`const x = if …`, attributes, path/math/string
const commands).

Public Rust API note (for embedders / out-of-tree commands):
`Command::run_const` gained a `stack: &mut Stack` parameter. That is a
breaking change for anyone implementing `Command` outside this repo, but
not for end users of the shell.

## User-facing changes (Release notes)

## Additional notes
- Continues the AST→IR call migration (phases 0–1 prior; this is phase
2).
- Next: phase 3 — residual AST `eval_call` producers (`open` converters,
custom completions, documentation, empty `Call::new`).
- Then phase 4 — collapse `CallImpl` Ast variants.
2026-09-16 07:45:16 -05:00
Jorge PolancoandClaude Opus 4.8 f2fdb76d7d feat(mkdir): add --fail-if-exists flag to error on existing directory (#19021)
# Description

Follow-up to #19003. The default `mkdir` behavior (idempotent,
`-p`-like) stays exactly as-is — #19006 tried making it error by default
and was reverted in #19008, since people rely on `mkdir foo` to just
ensure a directory exists (and `^mkdir -p` doesn't error either). Per
@fdncred's suggestion in the thread, this instead adds an **opt-in**
flag.

With `--fail-if-exists`, `mkdir` errors on a target that already exists
(message `<path>: File exists`, matching coreutils), while still
creating any non-existing targets passed in the same call. Without the
flag, nothing changes.

The `--verbose` `created: true` half of the issue was already fixed in
#19017, so this covers the remaining piece.

# User-Facing Changes

New opt-in switch: `mkdir --fail-if-exists <dir>` (short: none) errors
if the directory already exists instead of silently succeeding. Default
`mkdir` is unchanged.

# Tests + Formatting

Added `commands::umkdir` tests: errors on an existing dir with the flag,
still creates new dirs with the flag, and `-v --fail-if-exists` reports
`created: false`. Existing default-behavior tests (idempotent mkdir,
intermediary dirs) still pass. `cargo fmt --all --check`, `cargo clippy
-p nu-command`, and the `nu-command` test suite are clean.

# After Submitting

Nothing needed (no doc/`std` changes).

---
_Disclosure: I use AI assistance for code review and for drafting text
(English isn't my first language); I review and verify every change
myself before sending it._

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-16 07:43:47 -05:00
dependabot[bot] 6baba09b53 build(deps): bump taiki-e/install-action from 2.87.7 to 2.87.12 (#19028)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.87.7 to 2.87.12.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.87.12</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 48.0.2.</p>
</li>
<li>
<p>Update <code>wasm-tools@latest</code> to 1.259.0.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.13.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.165.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.27.1.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.5.</p>
</li>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.144.</p>
</li>
</ul>
<h2>2.87.11</h2>
<ul>
<li>
<p>Update <code>biome@latest</code> to 2.5.13.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.12.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.4.</p>
</li>
<li>
<p>Update <code>kache@latest</code> to 0.19.0.</p>
</li>
</ul>
<h2>2.87.10</h2>
<ul>
<li>
<p>Update <code>zizmor@latest</code> to 1.30.1.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.11.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.5.4.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.164.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.3.</p>
</li>
<li>
<p>Update <code>kingfisher@latest</code> to 2.2.0.</p>
</li>
</ul>
<h2>2.87.9</h2>
<ul>
<li>
<p>Update <code>oxfmt@latest</code> to 1.82.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.2.</p>
</li>
<li>
<p>Update <code>kache@latest</code> to 0.18.0.</p>
</li>
<li>
<p>Update <code>d2@latest</code> to 0.9.0.</p>
</li>
<li>
<p>Update <code>bpf-linker@latest</code> to 0.11.1.</p>
</li>
</ul>
<h2>2.87.8</h2>
<ul>
<li>Update <code>shfmt@latest</code> to 3.14.1.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.87.13] - 2026-09-15</h2>
<ul>
<li>
<p>Update <code>zola@latest</code> to 0.23.6.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.30.5.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.5.5.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.167.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.27.2.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.3.</p>
</li>
<li>
<p>Update <code>osv-scanner@latest</code> to 2.6.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.7.</p>
</li>
<li>
<p>Update <code>kache@latest</code> to 0.21.0.</p>
</li>
<li>
<p>Update <code>cargo-leptos@latest</code> to 0.3.8.</p>
</li>
<li>
<p>Update <code>cargo-auditable@latest</code> to 0.7.6.</p>
</li>
</ul>
<h2>[2.87.12] - 2026-09-12</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 48.0.2.</p>
</li>
<li>
<p>Update <code>wasm-tools@latest</code> to 1.259.0.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.13.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.165.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.27.1.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.5.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/taiki-e/install-action/commit/3f74d7c16a4242f1c95561e98edc25d36adb4375"><code>3f74d7c</code></a>
Release 2.87.12</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/e7f36aa5946476a40e5a2af1a5153c247e70d548"><code>e7f36aa</code></a>
Update wasmtime manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/b208ecf6341e27a32fd9a0f8e1821a008552f41c"><code>b208ecf</code></a>
Update zola manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/497268209395d5883d6a88462e1c9c6bf3fbbeff"><code>4972682</code></a>
Update <code>wasmtime@latest</code> to 48.0.2</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/9f978f55d62c453c7eb420ab8cc3f13ba748aa42"><code>9f978f5</code></a>
Update <code>wasm-tools@latest</code> to 1.259.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/01d96944a7a5eab62bfb45b5ba70d36285f8534c"><code>01d9694</code></a>
Update <code>uv@latest</code> to 0.12.13</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/7af43af4f6fc1df7d126ab45be6a2e8770112f87"><code>7af43af</code></a>
Update <code>release-plz@latest</code> to 0.3.165</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/5ebe8aae964ff306a8f78d0e61277195869cc640"><code>5ebe8aa</code></a>
Update <code>protoc-gen-connect-openapi@latest</code> to 0.27.1</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/c054431878700879a4853ce12d3c492be3580620"><code>c054431</code></a>
Update <code>mise@latest</code> to 2026.9.5</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/2ad5cec3cabb51430ef1c2ac40ba63f32add42a9"><code>2ad5cec</code></a>
Update <code>cargo-nextest@latest</code> to 0.9.144</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/install-action/compare/84f5ac3124727fb3d284d4d22ee9ab3654fd09a6...3f74d7c16a4242f1c95561e98edc25d36adb4375">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.87.7&new-version=2.87.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-16 07:37:09 -05:00
David Bateman 85e3f5a1c7 Merge commit from fork
* fix: isolate plugin local sockets

* test: cover local socket directory security invariants
2026-09-16 06:46:27 -05:00
dependabot[bot] 15c5f987b9 build(deps): bump tabled from 0.21.0 to 0.22.0 (#19031)
Bumps [tabled](https://github.com/zhiburt/tabled) from 0.21.0 to 0.22.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zhiburt/tabled/blob/master/CHANGELOG.md">tabled's
changelog</a>.</em></p>
<blockquote>
<h2>[0.22.0] - 2026-09-05</h2>
<h3>Added</h3>
<ul>
<li>Added <code>CompactTable::skip</code> function (by <a
href="https://github.com/ChrisJr404"><code>@​ChrisJr404</code></a>).</li>
<li>Added <code>Color</code> text-attribute constants
<code>BLINK</code>, <code>DIMMED</code>, <code>HIDDEN</code>,
<code>INVERT</code>, <code>ITALIC</code>, <code>RESET</code> and
<code>STRIKETHROUGH</code> (by <a
href="https://github.com/ChrisJr404"><code>@​ChrisJr404</code></a>).</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Replaced proc-macro-error2 with syn::Error in static_table (by <a
href="https://github.com/hex22a"><code>@​hex22a</code></a>)</li>
<li>Replaced proc-macro-error2 with syn::Error in tabled_derive (by <a
href="https://github.com/shrey4796"><code>@​shrey4796</code></a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fixed docs.rs build (by <a
href="https://github.com/amorison"><code>@​amorison</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/zhiburt/tabled/commits/v0.22.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tabled&package-manager=cargo&previous-version=0.21.0&new-version=0.22.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-16 06:27:30 -05:00
dependabot[bot] 5b80af41b7 build(deps): bump dirs from 6.0.0 to 7.0.0 (#19030)
Bumps dirs from 6.0.0 to 7.0.0.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dirs&package-manager=cargo&previous-version=6.0.0&new-version=7.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-16 06:24:11 -05:00
dependabot[bot] 8fc5f69c1e build(deps): bump actions-rust-lang/setup-rust-toolchain from 1.17.0 to 2.0.0 (#19029)
Bumps
[actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain)
from 1.17.0 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's
releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>
<p>Use <code>CARGO_BUILD_WARNINGS</code> for enforcing warning free
compilations (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/98">#98</a>)
This is a new variable supported by cargo 1.97+ <a
href="https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/#cargo-support-for-denying-warnings">and
sets the <code>build.warnings</code> config</a>.
It allows removing the <code>RUSTFLAGS=&quot;-D warnings&quot;</code>
default, which will improve compatibility with
<code>target.*.rustflags</code> and <code>.cargo/config.toml</code>
files.</p>
<p>This adds a new <code>build-warnings</code> input to configure the
value for the <code>build.warnings</code> config.</p>
</li>
<li>
<p>Add error matcher for Rust panics
This will highlight the location of the panic location during tests.</p>
</li>
<li>
<p>Reuse output of <code>rustc --version --verbose</code> calls (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/103">#103</a>
by <a
href="https://github.com/ChihweiLHBird"><code>@​ChihweiLHBird</code></a>)</p>
</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/ChihweiLHBird"><code>@​ChihweiLHBird</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/103">actions-rust-lang/setup-rust-toolchain#103</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.17.0...v2.0.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.17.0...v2.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>The format is based on <a
href="https://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>,
and this project adheres to <a
href="https://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
<h2>[Unreleased]</h2>
<h2>[2.0.0] - 2026-09-07</h2>
<ul>
<li>
<p>Use <code>CARGO_BUILD_WARNINGS</code> for enforcing warning free
compilations (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/98">#98</a>)
This is a new variable supported by cargo 1.97+ <a
href="https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/#cargo-support-for-denying-warnings">and
sets the <code>build.warnings</code> config</a>.
It allows removing the <code>RUSTFLAGS=&quot;-D warnings&quot;</code>
default, which will improve compatibility with
<code>target.*.rustflags</code> and <code>.cargo/config.toml</code>
files.</p>
<p>This adds a new <code>build-warnings</code> input to configure the
value for the <code>build.warnings</code> config.</p>
</li>
<li>
<p>Add error matcher for Rust panics
This will highlight the location of the panic location during tests.</p>
</li>
<li>
<p>Reuse output of <code>rustc --version --verbose</code> calls (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/103">#103</a>
by <a
href="https://github.com/ChihweiLHBird"><code>@​ChihweiLHBird</code></a>)</p>
</li>
</ul>
<h2>[1.17.0] - 2026-06-25</h2>
<ul>
<li>Add new parameter <code>cache-targets</code> that is propagated to
<code>Swatinem/rust-cache</code> as <code>cache-targets</code> (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/84">#84</a>).
This allows disabling caching of the workspace <code>target</code>
directory, e.g. when using <code>sccache</code>, while keeping the rest
of the cache enabled.</li>
</ul>
<h2>[1.16.1] - 2026-05-08</h2>
<ul>
<li>Renamed internally used variable to avoid clashes with globally
existing variables.
This fixes the interference of the TOOLCHAIN variable as reported in <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/91">#91</a>.</li>
</ul>
<h2>[1.16.0] - 2026-04-13</h2>
<ul>
<li>Add new parameter <code>cache-save-if</code> that is propagated to
<code>Swatinem/rust-cache</code> as <code>save-if</code> (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/90">#90</a>
by <a
href="https://github.com/ChanTsune"><code>@​ChanTsune</code></a>)</li>
</ul>
<h2>[1.15.4] - 2026-03-15</h2>
<ul>
<li>Bump Swatinem/rust-cache from 2.8.2 to 2.9.1 (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/87">#87</a>
by <a
href="https://github.com/hyperfinitism"><code>@​hyperfinitism</code></a>)
This gets rid of the warnings about Node.js 20.</li>
</ul>
<h2>[1.15.3] - 2026-03-01</h2>
<ul>
<li>Bump Swatinem/rust-cache from 2.8.1 to 2.8.2</li>
</ul>
<h2>[1.15.2] - 2025-10-04</h2>
<ul>
<li>Fix: Run the version detection steps in the selected
<code>rust-src-dir</code> directory.
This should enable the version selection even without a default
toolchain installed.
Fixes <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/74">#74</a>.</li>
</ul>
<h2>[1.15.1] - 2025-09-23</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/ecabd13d1c56bd1345c230e542e9144811ad706f"><code>ecabd13</code></a>
Prepare changelog for 2.0.0 release</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/dc0039119c40a73363ef8aa36cecf5b44a260d7f"><code>dc00391</code></a>
Add error matcher for Rust panics</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/70de7eb7ad0b09e07bfd410f1322fa8c0cabfe80"><code>70de7eb</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/103">#103</a>
from ChihweiLHBird/reuse-rustc-verbose-output</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c420b69d2b138295fd15e0657ee6df4082082b52"><code>c420b69</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/105">#105</a>
from actions-rust-lang/use-build-warnings</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/d94d10afcf74900a3a5d9e06ca0f742e9939fa8b"><code>d94d10a</code></a>
Use CARGO_BUILD_WARNINGS for enforcing warning free compilations</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/34430aa949d489e52a8298cf44d37687816a388e"><code>34430aa</code></a>
Reuse rustc verbose output instead of invoking rustc three times.</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/0267444136ce4919088f5eae0461f736f21356de"><code>0267444</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/102">#102</a>
from actions-rust-lang/dependabot/github_actions/Swat...</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/5fa2882d530879536093c3ccff2f02f8cf17d8fb"><code>5fa2882</code></a>
Bump Swatinem/rust-cache from 2.9.1 to 2.9.2</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/8439c15d249cd2e2a5c80ad3da200c3d8c553ae4"><code>8439c15</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/100">#100</a>
from actions-rust-lang/dependabot/github_actions/acti...</li>
<li><a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c8f944a9fe45dd3927fc57284f27f46460f067ba"><code>c8f944a</code></a>
Bump actions/checkout from 7.0.0 to 7.0.1</li>
<li>See full diff in <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/166cdcfd11aee3cb47222f9ddb555ce30ddb9659...ecabd13d1c56bd1345c230e542e9144811ad706f">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions-rust-lang/setup-rust-toolchain&package-manager=github_actions&previous-version=1.17.0&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-16 06:23:41 -05:00
Sebastian Lenzlinger 776a29db5e feat(hash): add sha512 subcommand (#19027)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->
This PR adds a `sha512` subcommand to the `hash` command. The `sha512`
subcommand is implemented in `sha512.rs`. `sha512.rs` is basically a
copy of `sha256.rs`, except that it uses `sha2::Sha512` instead of
`sha2::Sha256`. Text strings are adjusted accordingly. The expected
values for the example tests and unit tests have been updated to their
sha512 digests.
The subcommand is registered alongside the other hash functions in
`crates/nu-command/src/default_context.rs`. Finally, a test case that
depends on the actual subcommands of the `hash` built-in is fixed so
that it passes, by making it aware of the new subcommand.
## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->
You can now hash a value using the sha512 algorithm using the `hash
sha512` built-in.
## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-15 19:04:48 -05:00
Darren Schroeder 6cf11a28f5 update rustls & friends (#19026)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR updates rustls and a few other crates due to a security warning.
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-14 16:25:18 -05:00
76ba59d425 fix(view source): put a space after the colon on a rest parameter (#19024)
## Description

`view source` renders a rest parameter without a space after the colon,
unlike
every other parameter kind:

```nu
> def test [a?:any --b:int ...rest:string] { echo 'test' }; view source test
def test [ a?: any --b: int ...rest:string] { echo 'test' }
```

`a?: any` and `--b: int` are spaced; `...rest:string` is not. In
`render_def`
the branches are:

| kind | format |
| --- | --- |
| required positional | `"{}: {} "` |
| optional positional | `"{}?: {} "` |
| flag with an argument | `": {arg}"` |
| rest | `"...{}:{}"` |

The rest branch is the only one missing the space. The command's own
examples
already show `...rest: string`, in two of them, so the documented form
was the
right one and the code disagreed with it.

Why it was not caught: `view_source.rs` declares eight example results
and had
no test running them. Adding `test_examples` for `ViewSource` is what
surfaced
this, and it also caught a second, smaller mismatch — the module example
claimed

```
" export-env { $env.FOO_ENV = 'BAZ' }"
```

while `view source` returns the source between the module's braces
verbatim,
so the real value has the trailing space too. That one is the example
being
wrong rather than the code, so the example is corrected.

## User-facing changes (Release notes)

`view source` now renders a rest parameter as `...rest: string` rather
than
`...rest:string`, matching how it already renders every other parameter.

## Tests + Formatting

Added `test_examples` for `ViewSource`, which runs all eight declared
example
results. It is not vacuous — it is what found both mismatches, failing
first on

```
expected: "def --env --wrapped foo [ ...rest: string] { print $rest }"
got:      "def --env --wrapped foo [ ...rest:string] { print $rest }"
```

and then on the module example. Both are green now.

The full `nu-command` lib suite (815 tests) and the existing
`view_source`
integration tests pass. I checked nothing asserted the old spelling: the
only
other `...name:type` in the tree is input source in an unrelated parser
test,
not an assertion on `view source` output. `cargo fmt --all -- --check`
and
`cargo clippy --all-targets` are clean.

## Additional notes

Third small `nu-command` fix from me after #19017 and #19023, same
theme: a
declared example result that nothing was checking.

Co-authored-by: Prajwal Narayana <sprajwalln@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 06:24:01 -05:00
8eb16b2018 docs(mkdir): the --verbose example showed output that never occurs (#19023)
## Description

`help mkdir` shows this for the `--verbose` example:

| path | created | error |
| --- | --- | --- |
| foo/bar | true | |
| foo2 | true | |

`mkdir` never produces that. Every argument goes through
`nu_path::expand_path_with(..)` before it reaches the output, so the
reported
paths are absolute:

```
> mkdir -v foo/bar foo2 | get 0.path
/tmp/.tmpHDMTuH/mkdir_verbose_absolute/foo/bar
```

Since the value depends on the working directory, it cannot be written
down as
a literal at all — so this drops the declared `result`, the way the
first
example in the same command already does, and says in the description
that the
paths are absolute.

Why it went unnoticed: `umkdir.rs` has no `test_examples()`, unlike the
commands
in `crates/nu-command/src/path/`, so the declared result was never
compared
against what the command actually returns.

## User-facing changes (Release notes)

n/a — documentation only. The `help mkdir` example no longer shows
output that
the command cannot produce.

## Tests + Formatting

Added `verbose_reports_the_expanded_path`, which asserts the reported
path
equals the expanded path rather than the argument as typed. It is not
vacuous:
pointing it at the value the example used to claim produces

```
assertion `left == right` failed
  left: "foo/bar"
 right: "/tmp/.tmpHDMTuH/mkdir_verbose_absolute/foo/bar"
```

which is the bug this PR fixes. All 18 `umkdir` tests pass;
`cargo fmt --all -- --check` and `cargo clippy --all-targets` are clean.

I did not add `test_examples()` for this command: its examples create
directories as a side effect, which is presumably why it has none.

## Additional notes

Follow-up to #19017, same command, unrelated bug.

Co-authored-by: Prajwal Narayana <sprajwalln@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 06:22:23 -05:00
b6e6562a9a fix(mkdir): don't report an existing directory as created in --verbose (#19017)
## Description

`mkdir --verbose` reports `created: true` for directories that already
existed.

`mkdir` builds its uutils config with `recursive: true` (the
`IS_RECURSIVE`
constant), and in that mode `uu_mkdir` returns `Ok(())` for a path that
is
already there rather than raising "File exists" — that check is guarded
by
`!config.recursive`. The verbose branch treated every non-error as a
creation,
so an existing directory came back as `created: true`.

This records whether the path existed before the call and reports that
instead:

```nu
> mkdir foo
> mkdir -v foo
╭───┬──────────────┬─────────┬───────╮
│ # │     path     │ created │ error │
├───┼──────────────┼─────────┼───────┤
│ 0 │ /tmp/xxxx/foo│ false   │       │
╰───┴──────────────┴─────────┴───────╯
```

Previously that same row said `created: true`.

Scope: this touches only the `created` column. Whether `mkdir` should
*fail* on
an existing directory is the open question in #19003, and I have
deliberately
not answered it here — that one is a behavior change worth deciding
separately,
since `mkdir` in Nushell is always `mkdir -p` and POSIX has `-p`
suppress the
error. The `created` field is wrong under any answer to it, because
nothing was
created either way.

## User-facing changes (Release notes)

Fixed `mkdir --verbose` reporting `created: true` for directories that
already
existed. Such rows now report `created: false`. Directories that are
actually
created are unaffected.

## Tests + Formatting

Two tests in `crates/nu-command/tests/commands/umkdir.rs`:

- `verbose_does_not_report_existing_directory_as_created`
- `verbose_reports_newly_created_directory_as_created` — the control, so
the
  first cannot pass by inverting the field

I checked these are not vacuous: reverting the one-line change makes the
first
fail while the control still passes. The other 15 existing `umkdir`
tests pass
unchanged.

`cargo fmt --all -- --check` and `cargo clippy --all-targets` are clean.

## Additional notes

Related to #19003 — this fixes one part of that report and deliberately
leaves
the exit-code question open. See my comment there for the trade-offs.

Co-authored-by: Prajwal Narayana <sprajwalln@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 07:31:36 -05:00
David Bateman 9a251561a9 fix: use stack config for commandline completions (#19012)
## Description

Fixes `commandline complete` so it observes an external completer
assigned to `$env.config` earlier in the same script.

The completion engine already carries a `Stack`, but parts of the
external completer path were reading config from
`EngineState::get_config()`. That missed stack-local `$env.config`
updates made during the running script. This changes those completion
paths to use stack-aware config lookup, matching the guidance on
`EngineState::get_config()`.

A regression test was added for setting
`$env.config.completions.external.completer` and then calling
`commandline complete` in the same script.

## User-facing changes (Release notes)

Fixed an issue where `commandline complete` ignored an external
completer assigned to `$env.config.completions.external.completer`
earlier in the same script.

## Additional notes

Fixes #18984
2026-09-12 07:18:26 -05:00
Darren Schroeder 164c9f2e75 fix nested table after wrapping/truncating changes (#19007)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR tries to fix a bug where nested tables weren't wrapping
properly.
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)

Fixed `table --expand` wrapping nested tables as text, which broke their
borders (for example `plugin list` after #18979).

Long cells in nested tables still wrap or truncate **inside** the inner
table according to `$env.config.table.trim`. The inner box stays a
table. Scalar columns on the parent still wrap or truncate the same way
as in #18979.

<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
closes https://github.com/nushell/nushell/issues/19002
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-11 09:54:01 -05:00
Martin Kronberger d8440bdd1f chore: bump reedline to 436f17b (#19013)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

bumps reedline to latest commit (436f17b) including:
- fix: let no-op cursor moves fall through
(https://github.com/nushell/reedline/commit/436f17bf2ffa543dcfd352f37659512e653d771b)
- fix(painter): keep the right prompt through the exit erase
(https://github.com/nushell/reedline/commit/d5af1d17c9980ac2861805f94df39bdd932e2e80)
- docs: document the default keybindings for all three edit modes
(https://github.com/nushell/reedline/commit/2659a7a34deeb33b11d0e25e4ca923373732e17f)
- fix(painter): don't fail read_line on an unanswered anchor query
(https://github.com/nushell/reedline/commit/9711eac88af66f445481618af6757d0acf31d700)
- fix(menu): submit past a menu with no suggestions
(https://github.com/nushell/reedline/commit/dba4621d010fe4f9363a76504b66e5b1eed25add)

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-11 06:46:03 -05:00
Yossi Eliaz 54c09e9ae4 Fix par-each deadlock when chaining same-size thread pools (#18999)
Fixes #18997.

Only reuse idle cached pools and retain a producer reference until
completion to prevent deadlocks between chained streaming stages.

Adds a single-worker, 100-value regression test. Compilation and tests
have not been run.
2026-09-10 16:30:23 -05:00
Ronan Arraes Jardim Chagas 1ed063b1d4 Support escaped spaces inside double quotes (#19010)
## Description

Terminals such as macOS Terminal.app, iTerm2 and Ghostty escape spaces
with a backslash when a
file or folder is dragged into the window, for example
`/Users/mac/Downloads/a\ hourly\ list\ 1.txt`. Nushell could not accept
that text anywhere: a bare
word splits at the space, and `"a\ b"` was a parse error (`unrecognized
escape sequence '\ '`).

In this PR, I added `\ ` (a backslash followed by a space) to the escape
sequences recognized
inside double-quoted strings. It yields a literal space and joins the
existing "special" escapes
(`\(`, `\)`, `\{`, `\}`, `\$`, `\#`, `\~`, `\|`, ...), which already
cover the other characters those
terminals escape. The workflow becomes: type `"`, drop the file, type
`"`.

Why double quotes only:

- `"a\ b"` was a hard error before, so no existing script changes
meaning, on any platform.
- Single quotes and backticks stay byte-literal. The NUON spec documents
backticks as literal, and
the path completer emits raw paths inside backticks without escaping
backslashes, so giving `\ `
a meaning there would be a breaking change (and would silently rewrite
`C:\dir\ file` on Windows).
- Bare-word support is not possible without breaking Windows paths such
as `ls C:\ D:\`.

Because `unescape_string` is shared, the escape works in `"..."`,
`$"..."`, external command
arguments, `source`/`use` paths and `from nuon`. No lexer, completion or
highlighting changes were
needed. The doc comment on `unescape_string` that was lost in the parser
file split (#18388) is
restored, and the NUON spec now lists the new escape.

```nushell
"/Users/mac/Downloads/a\ hourly\ list\ 1.txt"
# => /Users/mac/Downloads/a hourly list 1.txt

ls "dir\ with\ space/file\ one.txt" | get name
# => dir with space/file one.txt

'a\ b'       # => a\ b   (unchanged)
echo `a\ b`  # => a\ b   (unchanged)
```

## User-facing changes (Release notes)

Added `\ ` (a backslash followed by a space) as an escape for a literal
space inside double-quoted
strings, so paths that terminals escape on drag-and-drop can be pasted
between double quotes
unchanged: `ls "/Users/me/My\ Documents/notes\ (1).txt"`. Previously
this was a parse error.
Single quotes, backticks and bare words are unchanged.

## Additional notes

- Closes #12464 (the double-quoted form; bare-word `\ ` remains out of
scope because of Windows
  paths, as discussed in the issue).
- Related: #11944, #18217.
- Tests added in `tests/parsing/escaping.rs`: the reporter's exact path,
interpolation, the
`\\ ` ordering, proof that single quotes and backticks stay literal, an
end-to-end `ls`/`cd` on a
directory with a space, and an external command receiving a single
argument.
- The book's list of double-quote escapes (nushell.github.io, "Working
with strings") needs the
  new entry after merge.

🤖 The test cases and this description was generated with [Claude
Code](https://claude.com/claude-code)
2026-09-10 13:07:06 -05:00
Darren Schroeder 0ffb26ca86 Revert "mkdir errors on already-created dir" (#19008)
Reverts nushell/nushell#19006

@pickx if you want to implement a new flag for this functionality
instead of having it as default, have at it.
2026-09-10 09:57:49 -05:00
Siddharth 5877cdff88 fix: propagate error stream values in length, columns, and is-empty (#18976)
# Description

Fixes #18928. `length`, `columns`, and `is-empty` (and `is-not-empty`)
silently consumed `Value::Error` stream items instead of surfacing them,
producing wrong, silent results (e.g. `where` with a type error →
`length` reports the unfiltered row count, `columns` returns `[]`,
`is-empty` returns the wrong boolean).

Now all three propagate the first error encountered in the input stream:

- `length`: the `ListStream` count loop calls `unwrap_error()` on each
value, returning the inner `ShellError` instead of counting it.
- `columns`: scans both the `Value::List` and `ListStream` inputs for
`Value::Error` before computing columns, returning the inner error (a
list containing an error previously short-circuited `get_columns` to
`[]`).
- `is-empty` / `is-not-empty`: the `ListStream` and `Value` branches of
`empty()` return the inner error instead of treating an error item as
"not empty" (a bare `Value::Error` input previously fell through to
`is_empty()` → `false`).

This is consistent with the error propagation that #16738 established
for stream-collecting commands (`into_value`, `unwrap_error`); these
three commands bypassed it with manual iteration.

## Verification

- Three new integration tests (one per command), all asserted to raise
the propagated error.
- Confirmed each test reproduces the bug pre-fix:
  - `columns` returned `List([])` instead of erroring
  - `length` returned the wrong count
  - `is-empty` returned the wrong boolean
- Post-fix all pass.
- `cargo fmt --check -p nu-command`: clean
- `cargo clippy -p nu-command --all-targets`: clean
- Full `nu-command` tests: 2884 pass, 22 fail — all pre-existing Windows
symlink/privilege failures (e.g. `can not create symlink: A required
privilege is not held by the client`), unrelated to this change.

# User-Facing Changes

`[[name size]; [a 100b] [b 200b]] | where size <= 150 | length` now
errors with `nu::shell::operator_incompatible_types` instead of
returning `2`, and likewise for `columns` / `is-empty`.

# Tests + Formatting

- Added tests under `crates/nu-command/tests/commands/` (`length.rs`,
`empty.rs`, new `columns.rs`).
- `cargo fmt --check` and `cargo clippy` clean as noted above.

## AI disclosure

This change was authored with the assistance of an AI coding agent.
2026-09-10 09:27:26 -05:00
Piepmatz 36ec205f25 Replace to yaml --compact-list-indent with --list-indent (#19005) 2026-09-10 16:17:20 +02:00
pickx 954e34dad2 mkdir errors on already-created dir (#19006)
## Description
closes #19003. tl;dr: since we always run `mkdir` with implied
`--parents`, dirs are always created and errors are never thrown.
however, we forgot to detect when dirs are not created because they
already exist.

note also that we now use `translate` in the `error` field when
`--verbose` is passed. this can pretty easily run into #19004 (for
example if `mktemp` was used beforehand). this also keeps the dir name
in the error, so you can have something like `path: /foo/bar, created:
false, error: /foo/bar: File exists`. in other words, we repeat the
path. tell me if that's not what we want.

## User-facing changes (Release notes)
`nushell` will now error when a dir already exists. nushell's
`--verbose` will no longer report a dir as created when it already
exists. however, if multiple dirs are created in the same command (e.g.
`mkdir dir1 dir2/dir3 dir4`) and some of them already exist, the
non-existing ones will still be created. this matches the behavior of
typical `mkdir` implementations.

## Disclosure
AI was consulted while creating this, but did not generate code.
2026-09-10 09:10:26 -05:00
dependabot[bot] 9cb59b9c6d build(deps): bump crate-ci/typos from 1.50.0 to 1.50.1 (#18991)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.50.0 to
1.50.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.50.1</h2>
<h2>[1.50.1] - 2026-09-01</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>asend</code> in Python code</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h1>Change Log</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>The format is based on <a href="https://keepachangelog.com/">Keep a
Changelog</a>
and this project adheres to <a href="https://semver.org/">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased] - ReleaseDate</h2>
<h2>[1.50.1] - 2026-09-01</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>asend</code> in Python code</li>
</ul>
<h2>[1.50.0] - 2026-08-28</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1587">August
2026</a> changes</li>
</ul>
<h2>[1.49.1] - 2026-08-27</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct the brand name <code>HashiCorp</code></li>
</ul>
<h2>[1.49.0] - 2026-08-03</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1573">July
2026</a> changes</li>
</ul>
<h2>[1.48.0] - 2026-06-30</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1562">June
2026</a> changes</li>
</ul>
<h2>[1.47.2] - 2026-06-04</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>inferrable</code></li>
<li>Correct unused <code>inferible</code> variant</li>
</ul>
<h2>[1.47.1] - 2026-06-03</h2>
<h3>Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/crate-ci/typos/commit/d43b6c087ac471e2ea7b8af622ff15f05c0c365b"><code>d43b6c0</code></a>
chore: Release</li>
<li><a
href="https://github.com/crate-ci/typos/commit/84aa9630a9832cedb7be976b3a3e4e4cd9ad68e8"><code>84aa963</code></a>
docs: Update changelog</li>
<li><a
href="https://github.com/crate-ci/typos/commit/79e6746de5fb3fe58bb2d7a2128c22fd01e9e5e0"><code>79e6746</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1608">#1608</a>
from nightcityblade/fix/python-asend</li>
<li><a
href="https://github.com/crate-ci/typos/commit/aba69857f2fe31f16eb41990c92c0a3fa3244be1"><code>aba6985</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1616">#1616</a>
from crate-ci/renovate/clap-cargo-0.x</li>
<li><a
href="https://github.com/crate-ci/typos/commit/92ed824f4f7394e08eb031378ac49112ec496efd"><code>92ed824</code></a>
chore(deps): Update compatible (<a
href="https://redirect.github.com/crate-ci/typos/issues/1615">#1615</a>)</li>
<li><a
href="https://github.com/crate-ci/typos/commit/e575a6c8a0e161ad343c1b11e2bf6ee464fff115"><code>e575a6c</code></a>
chore(deps): Update Rust crate clap-cargo to 0.19.0</li>
<li><a
href="https://github.com/crate-ci/typos/commit/5956a2610c16be2214e843ffebc3ac6d80c73f25"><code>5956a26</code></a>
fix: Allow Python asend identifier</li>
<li><a
href="https://github.com/crate-ci/typos/commit/f6ce659dbc0756e315afbd7b0176e0410ef183e1"><code>f6ce659</code></a>
test: Capture Python asend behavior</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/4d9c206a77c041268485162b8e2579ad7a5cb9a3...d43b6c087ac471e2ea7b8af622ff15f05c0c365b">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.50.0&new-version=1.50.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-10 17:32:59 +08:00
dependabot[bot] 0b9301e8a7 build(deps): bump taiki-e/install-action from 2.86.6 to 2.87.7 (#18990)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.86.6 to 2.87.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.87.7</h2>
<ul>
<li>
<p>Update <code>wasm-bindgen@latest</code> to 0.2.128.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.10.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.5.2.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.75.1.</p>
</li>
</ul>
<h2>2.87.6</h2>
<ul>
<li>
<p>Update <code>rafn@latest</code> to 0.1.6.</p>
</li>
<li>
<p>Update <code>editorconfig-checker@latest</code> to 3.11.3.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.57.1.</p>
</li>
<li>
<p>Update <code>convco@latest</code> to 0.7.2.</p>
</li>
</ul>
<h2>2.87.5</h2>
<ul>
<li>
<p>Update <code>vacuum@latest</code> to 0.30.3.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.9.</p>
</li>
<li>
<p>Update <code>typos@latest</code> to 1.50.1.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.5.1.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.161.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.2.</p>
</li>
<li>
<p>Update <code>oxfmt@latest</code> to 1.81.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.9.1.</p>
</li>
<li>
<p>Update <code>martin@latest</code> to 1.15.0.</p>
</li>
<li>
<p>Update <code>git-cliff@latest</code> to 2.14.1.</p>
</li>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.23.4.</p>
</li>
<li>
<p>Update <code>cargo-deb@latest</code> to 3.8.0.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.5.12.</p>
</li>
</ul>
<h2>2.87.4</h2>
<ul>
<li>
<p>Update <code>uv@latest</code> to 0.12.8.</p>
</li>
<li>
<p>Update <code>protoc@latest</code> to 3.36.1.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.87.8] - 2026-09-07</h2>
<ul>
<li>
<p>Update <code>shfmt@latest</code> to 3.14.1.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.162.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.26.0.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.57.4.</p>
</li>
<li>
<p>Update <code>cargo-llvm-cov@latest</code> to 0.9.1.</p>
</li>
<li>
<p>Update <code>cargo-crap@latest</code> to 0.5.0.</p>
</li>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.23.0.</p>
</li>
</ul>
<h2>[2.87.7] - 2026-09-06</h2>
<ul>
<li>
<p>Update <code>wasm-bindgen@latest</code> to 0.2.128.</p>
</li>
<li>
<p>Update <code>uv@latest</code> to 0.12.10.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.5.2.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.75.1.</p>
</li>
</ul>
<h2>[2.87.6] - 2026-09-05</h2>
<ul>
<li>
<p>Update <code>rafn@latest</code> to 0.1.6.</p>
</li>
<li>
<p>Update <code>editorconfig-checker@latest</code> to 3.11.3.</p>
</li>
<li>
<p>Update <code>dprint@latest</code> to 0.57.1.</p>
</li>
<li>
<p>Update <code>convco@latest</code> to 0.7.2.</p>
</li>
</ul>
<h2>[2.87.5] - 2026-09-04</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/taiki-e/install-action/commit/84f5ac3124727fb3d284d4d22ee9ab3654fd09a6"><code>84f5ac3</code></a>
Release 2.87.7</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/9387b0a701bf52ec87d0fab2bb9be442eb2d5d5a"><code>9387b0a</code></a>
Update <code>wasm-bindgen@latest</code> to 0.2.128</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/e78e42317f870ee65eecf610b1806e47a247d483"><code>e78e423</code></a>
Update <code>uv@latest</code> to 0.12.10</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/2a651e44c99da6e412156883bf77f6875ef10954"><code>2a651e4</code></a>
Update <code>tombi@latest</code> to 1.5.2</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/0b467d84e67f7d92f5ca881452597f458b89cea7"><code>0b467d8</code></a>
Update shfmt manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/7d5acd9c247d9a60de005f09476e45a48afba928"><code>7d5acd9</code></a>
Update release-plz manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/2405a4d813a372dde4907d5460f5a8d9dda80a39"><code>2405a4d</code></a>
Update <code>rclone@latest</code> to 1.75.1</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/f4416e2ad3467ae3dbf7b6480da275ce049b866c"><code>f4416e2</code></a>
Update protoc-gen-connect-openapi manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/b323c5fe780719037044305b5e5dd86de0d6953d"><code>b323c5f</code></a>
Update dprint manifest</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/0f9e7db50df379bbdd9d03ad3d2d1fa0c9d677a6"><code>0f9e7db</code></a>
Update cargo-llvm-cov manifest</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/install-action/compare/6cd13508893c0e7eab5f273c2575d3859bd7229a...84f5ac3124727fb3d284d4d22ee9ab3654fd09a6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.86.6&new-version=2.87.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-10 17:32:24 +08:00
Miles Wirht b263714878 feat(completions)!: unify completer inputs and output contracts (#18791)
Custom completion entry points each had their own calling convention,
so every completer had to work out how to read its input, rebuild
context it was not given, and often call `commandline` to recover
editor state:

    parameter completer      [context, offset]
    command-wide completer   [spans]
    external completer       {|spans| ...}
    menu source              {|buffer, position| ...}

All four now take the same three named inputs, bound by parameter name
rather than destructured: `token` (the token at the cursor), `place`
(the resolved completion site and its replacement range) and `buffer`
(the command line up to the cursor). A completer declares only the
ones it needs. Prefer `buffer` over calling `commandline`, since
`commandline` can be empty in some editor states, including after `;`.

Ordinary completers run on a background worker with stdin suppressed,
which is correct for normal completion but stops a completer from
driving a terminal picker such as fzf or `input list`. The new
`@interactive` attribute marks a completer that owns the terminal and
runs it inline on the line editor thread instead. That replaces the
experimental `background-completions` option, which was global and
thus all or nothing.

Breaking:

- `background-completions` is removed; `@interactive` is the
  per-completer replacement.
- A parameter completer that fails now yields no suggestions, rather
  than falling back to completing paths in the working directory.
- Command-wide and external completers may return `null` to decline,
  letting file completion or the next source answer.

Migration:

    def comp [input pos]        ->  def comp [token: record]
    def comp [spans]            ->  def comp [buffer: string]
    {|spans| ...}               ->  {|buffer: string| ...}
    {|buffer position| ...}     ->  {|token: record| ...}
    background-completions=off  ->  @interactive on the completer

Completion state is now resolved at the cursor, so nested closures,
aliases, multi-word command heads, flag values and empty argument
slots all complete correctly, and the work no longer clones the whole
engine and stack on every keystroke.

`commandline complete --input` returns the three inputs without
running a completer, which is the supported way to develop one. The
field reference for suggestion records and the `{completions,
options, fallback}` envelope stays in the pull request.
2026-09-10 01:33:36 +02:00
Yossi EliazandCursor 2cc7b086c8 Test Incredibuild self-hosted runner in CI (#18810)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 15:11:55 -05:00
dependabot[bot]andDarren Schroeder fb931ead1f build(deps): bump the uutils group with 8 updates (#18992)
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
2026-09-09 14:39:59 -05:00
Martin Kronberger e1befc5dc2 chore: bump reedline 06bf606 (#18986)
## Description

Bumps `reedline` from `a8e9364` to `06bf606`:

- `3eb9942` fix(history): match cwd prefix literally in sqlite search
(nushell/reedline#778)
- `b582ddb` feat(editor): add access to the command line selection
(nushell/reedline#1200)
- `aae283d` feat(editor): make copy selection report failure without
selection (nushell/reedline#1166)
- `87f4d79` fix(painter): re-use a bottom-row prompt if the cursor
returns unmoved (nushell/reedline#1201)
- `1585b51` feat(menu): add MenuAccept to take a completion without
submitting (nushell/reedline#1203)
- `06bf606` feat(vi): read an unbound Alt-<char> as Esc then <char>
(nushell/reedline#1207)

`MenuAccept` is the only new event in that range, thus the second commit
wires it into `reedline_config.rs`.

## User-facing changes (Release notes)

Added the `MenuAccept` keybinding event.
It takes the highlighted completion into the buffer and closes the menu
without submitting the line.
2026-09-09 17:29:05 +02:00
Mikhail Katychev 9d31579632 fix(nu-plugin): add socket feature flag to handle --no-default-features correctly (#18988)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description

Fixed compilation error resulting from `local-socket` feature flag being
undeclared on nu-plugin:

```sh-session
$ cargo check --workspace --no-default-features --features "plugin" -q
error[E0004]: non-exhaustive patterns: `Ok(ClientCommunicationIo::LocalSocket { .. })` not covered
   --> crates/nu-plugin/src/plugin/mod.rs:331:24
    |
331 |     let result = match mode.connect_as_client() {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Ok(ClientCommunicationIo::LocalSocket { .. })` not covered
    |
note: `Result<ClientCommunicationIo, nu_protocol::ShellError>` defined here
   --> /rustc/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/core/src/result.rs:557:0
   ::: /rustc/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/core/src/result.rs:561:4
    |
    = note: not covered
    = note: the matched value is of type `Result<ClientCommunicationIo, nu_protocol::ShellError>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
364 ~         },
365 +         Ok(ClientCommunicationIo::LocalSocket { .. }) => todo!()
    |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `nu-plugin` (lib) due to 1 previous error
```

## User-facing changes (Release notes)

Fixed an issue in workspace compilation where using "plugin" feature
flag resulted in a compilation error.


## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->

`cargo build -p nu_plugin_inc -p nu-plugin-engine --no-default-features
--features "nu-plugin-engine/local-socket"` will also reproduce the
issue.
2026-09-08 15:09:47 -05:00
Martin Kronberger b763fe4122 fix(nix): bump rust-overlay so the 1.96.1 toolchain resolves (#18985)
## Description

#18968 bumped `rust-toolchain.toml` to 1.96.1,
but the `rust-overlay` rev locked in `scripts/nix/flake.lock` predates that release,
so `fromRustupToolchainFile` fails with `error: Stable 1.96.1 is not available` and the flake will not evaluate.

Bumps `rust-overlay` `4a408e1` -> `6ae57a7`, lock file only.
`nixpkgs` left alone, since nothing forces it.

Checked on `x86_64-linux`: the toolchain resolves to `rust-default-1.96.1` and the default package evaluates again.

## User-facing changes (Release notes)

n/a, only affects building from the flake in `scripts/nix`.

## Additional notes

Follow-up to #18968.
2026-09-08 15:32:46 +02:00
Darren Schroeder 6312a790e3 fix table truncating vs wrapping (#18979)
## Description

At some point in time table column truncating vs column wrapping was
broken.

`$env.config.table.trim` is supposed to control how a **visible** column
that is narrower than its content is fitted:

- **wrapping**: stack overflow onto extra lines (optionally keeping
words)
- **truncating**: keep the row on one line and cut the cell, appending
`truncating_suffix`

That did not work in the cases people actually hit.

This PR tries to fix that problem.

## User-facing changes (Release notes)

Fixed `$env.config.table.trim` so wrapping and truncating actually
differ on default table display (`table -e` on terminals 100 columns or
wider), including with `header_on_separator`.

- **wrapping**: more columns; long cells wrap onto extra lines.
- **truncating**: one line per row; extra columns dropped with a
trailing `...`; a squeezed cell gets `truncating_suffix`.
- Columns are no longer squeezed to a single character (the `size` /
`s/i/z/e` ladder).
- The trailing `...` column is not `truncating_suffix`. That suffix only
appears when a visible cell is cut.

Example:

### wrapping
```nushell
~/src/nushell> $env.config.table.trim = { methodology: wrapping, truncating_suffix: "..." }
~/src/nushell> ls -al
╭────┬───────────────┬─────────┬───────────┬──────────┬───────────┬───────────┬───────────┬─────────┬───────┬──────────┬────────────┬─────╮
│  # │     name      │  type   │  target   │ readonly │   mode    │ num_links │   inode   │  user   │ group │   size   │  created   │ ... │
├────┼───────────────┼─────────┼───────────┼──────────┼───────────┼───────────┼───────────┼─────────┼───────┼──────────┼────────────┼─────┤
│  0 │ .DS_Store     │ file    │           │ false    │ rw-r--r-- │         1 │ 105784265 │ fdncred │ staff │   6.1 kB │ 2 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  1 │ .cargo        │ dir     │           │ false    │ rwxr-xr-x │         5 │ 104748545 │ fdncred │ staff │    160 B │ 2 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  2 │ .git          │ dir     │           │ false    │ rwxr-xr-x │        20 │ 104748469 │ fdncred │ staff │    640 B │ 2 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  3 │ .gitattribute │ file    │           │ false    │ rw-r--r-- │         1 │ 104748547 │ fdncred │ staff │    111 B │ 2 years    │ ... │
│    │ s             │         │           │          │           │           │           │         │       │          │ ago        │     │
│  4 │ .githooks     │ dir     │           │ false    │ rwxr-xr-x │         4 │ 104748548 │ fdncred │ staff │    128 B │ 2 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  5 │ .github       │ dir     │           │ false    │ rwxr-xr-x │         9 │ 104748551 │ fdncred │ staff │    288 B │ 2 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  6 │ .gitignore    │ file    │           │ false    │ rw-r--r-- │         1 │ 225043642 │ fdncred │ staff │    831 B │ a month    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  7 │ .idea         │ dir     │           │ false    │ rwxr-xr-x │         7 │ 133567994 │ fdncred │ staff │    224 B │ a year ago │ ... │
│  8 │ .mailmap      │ file    │           │ false    │ rw-r--r-- │         1 │ 110444015 │ fdncred │ staff │   2.1 kB │ 4 years    │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
│  9 │ .opencode     │ dir     │           │ false    │ rwxr-xr-x │         6 │ 209157307 │ fdncred │ staff │    192 B │ 2 months   │ ... │
│    │               │         │           │          │           │           │           │         │       │          │ ago        │     │
```
### truncating
```nushell
~/src/nushell> $env.config.table.trim = { methodology: truncating, truncating_suffix: "..." }
~/src/nushell> ls -al
╭────┬──────────────────────────────────────────┬─────────┬───────────┬──────────┬───────────┬───────────┬───────────┬─────────┬───────┬─────╮
│  # │                   name                   │  type   │  target   │ readonly │   mode    │ num_links │   inode   │  user   │ group │ ... │
├────┼──────────────────────────────────────────┼─────────┼───────────┼──────────┼───────────┼───────────┼───────────┼─────────┼───────┼─────┤
│  0 │ .DS_Store                                │ file    │           │ false    │ rw-r--r-- │         1 │ 105784265 │ fdncred │ staff │ ... │
│  1 │ .cargo                                   │ dir     │           │ false    │ rwxr-xr-x │         5 │ 104748545 │ fdncred │ staff │ ... │
│  2 │ .git                                     │ dir     │           │ false    │ rwxr-xr-x │        20 │ 104748469 │ fdncred │ staff │ ... │
│  3 │ .gitattributes                           │ file    │           │ false    │ rw-r--r-- │         1 │ 104748547 │ fdncred │ staff │ ... │
│  4 │ .githooks                                │ dir     │           │ false    │ rwxr-xr-x │         4 │ 104748548 │ fdncred │ staff │ ... │
│  5 │ .github                                  │ dir     │           │ false    │ rwxr-xr-x │         9 │ 104748551 │ fdncred │ staff │ ... │
│  6 │ .gitignore                               │ file    │           │ false    │ rw-r--r-- │         1 │ 225043642 │ fdncred │ staff │ ... │
│  7 │ .idea                                    │ dir     │           │ false    │ rwxr-xr-x │         7 │ 133567994 │ fdncred │ staff │ ... │
│  8 │ .mailmap                                 │ file    │           │ false    │ rw-r--r-- │         1 │ 110444015 │ fdncred │ staff │ ... │
│  9 │ .opencode                                │ dir     │           │ false    │ rwxr-xr-x │         6 │ 209157307 │ fdncred │ staff │ ... │
```

## Additional notes
closes https://github.com/nushell/nushell/issues/18966
2026-09-08 06:39:17 -05:00
Samuel Willows 1f4036cace update(style_computer.rs): fixed unessesary string allocations (#18975)
## Description
- improved string allocation by using a shallow value. Removing inner
type specification of lists, tables and records.

## User-facing changes (Release notes)
Optimize style_computer.rs#style_primitive to use shallow_get_type()
instead of get_type()

## Other
all tests pass (full local suite)
2026-09-06 12:51:05 -05:00
Lakshay Chauhan 4686b34091 docs(tutor): add conditional(if, match, where) tutorials (#18972)
## Description

Add a new `tutor conditionals` tutorial covering conditional logic and
pattern matching in Nushell.

The tutorial introduces:

* Using `if` / `else` / `else if` for conditional execution.
* Using `if` as an expression to produce a value.
* Using `match` for matching values against multiple patterns.
* Using `where` to conditionally filter values in a pipeline.

The tutorial is intended as an introduction to conditional logic rather
than a complete reference, with `help if`, `help match`, and `help
where` available for more details.

## User-facing changes

Added a new `tutor conditionals` tutorial for learning conditional
logic, pattern matching, and conditional filtering.

<img width="634" height="898" alt="image"
src="https://github.com/user-attachments/assets/a3935afc-a47c-4376-b292-6214763d6235"
/>
<img width="627" height="729" alt="image"
src="https://github.com/user-attachments/assets/cb5c3217-4295-4e2c-91a7-19d8b508ba1d"
/>

## Additional notes

- related: #18895
2026-09-05 10:34:34 -05:00
Darren Schroeder f8ae9ac5d6 bump rust toolchain to 1.96.1 (#18968)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR bumps nushell to the rust toolchain version 1.96.1
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-04 15:18:41 -05:00
cui fliter 6b9c094273 ide: report file read failures from --ide-check (#18961)
## Description

In this PR, I fixed an issue where `--ide-check` silently succeeded when
the input file could not be read.

`ide::check` previously ignored errors from `std::fs::read(file_path)`
by only handling the successful result. The caller then returned
`Ok(())`, making missing or unreadable files appear as if no diagnostics
were found.

The check now returns the file read error to the CLI entry point,
preserving the existing Nushell I/O error reporting behavior.

For example:

```text
nu --ide-check 5 does-not-exist.nu
```

now exits with a non-zero status and reports
`nu::shell::io::file_not_found`.

A CLI integration test was added for this behavior.

## User-facing changes (Release notes)

Fixed an issue where `--ide-check` silently succeeded when the target
file could not be read. Nushell now reports the file read error and
exits with a non-zero status.

## Additional notes

Signed-off-by: cuishuang <imcusg@gmail.com>
2026-09-03 08:34:15 -05:00
David BatemanandBahex 41bc76b1ba fix(parser): parse brace expressions in external calls (#18837)
## Description
External command arguments are normally parsed as strings. This caused
closures such as `{|x| $"($x)" }` to be treated as interpolated strings,
placing closure parameters outside their intended scope and producing a
misleading `variable_not_found` error.

External arguments beginning with `{` now use Nushell’s existing
`parse_brace_expr` logic. This consistently supports:
 - Parameterized closures such as `{|x| ...}`
 - Parameterized closures with whitespace such as `{ |x| ...}`
 - Parameterless closures such as `{ ... }`
 - Records such as `{a: 1}`
 - Empty records such as `{}`

Because unquoted brace expressions are now parsed as Nushell values,
braces intended as literal external arguments must be quoted:

```nu
^some-command '{a:1}'
```
Tests cover parameterized and parameterless closures, records, empty
records, and quoted record-like strings.

## User-facing changes (Release notes)

External command arguments beginning with { are now parsed as closures
or records; literal curly-braced arguments must be quoted.

## Additional notes
Closes #18116

---------

Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
2026-09-03 08:02:31 -05:00
7ea33f2510 View source dependencies (#18801)
Disclosure: the code was written by an AI agent (Claude) under my
direction; I can't review Rust line-by-line myself. What was verified so
far: `toolkit fmt`, `toolkit clippy` (lib with `-D clippy::unwrap_used`,
and tests), and the `view_source` integration tests — all on top of
current `main`.

## Description

`view source <name>` shows one command. Reading a command that is built
on other custom commands meant looking each one up by hand — and a
command private to a module could not be looked up at all, since
`find_decl` does not see it and `scope modules` does not list it. `view
source "log info" --dependencies` returns all eight definitions behind
it, seven of them private to `std/log`, and the five constants those
bodies read.

The output is a reading aid, not a script. The `def` header is rebuilt
from the signature instead of being quoted from the source, so `export`,
attributes and some type spellings do not survive. That was already true
without the flag.

Dependencies come from the `decl_id` the parser already binds into every
`Expr::Call`, walked with `Traverse::flat_map`. No name lookup is
involved, which is exactly what makes a module-private command
reachable. A visited set stops mutual recursion; a decl with no block —
builtin, keyword, known external, plugin — is skipped, having no source
to show; and a `def` nested in a body is not repeated, since its text is
already inside the parent's block.

A dependency is printed under its defining name, not the name the caller
imported it under: bodies are quoted verbatim, so a renamed header would
disagree with its own call sites. That surfaces on a module's `main`,
and is deliberate rather than a slip:

```nushell
module m { export def main [] { 1 }; export def caller [] { main } }
use m *
view source caller --dependencies
# => def caller [] { main }
# =>
# => def main [] { 1 }
```

Constants are collected by the same walk, from `Expr::Var`, and printed
before the definitions, the way a module writes them. They are leaves —
a constant's value is already evaluated, so it cannot reach a further
command or constant. Only the span of the *name* is recorded, not the
statement, so the right-hand side is the value the engine holds,
rendered as NUON: that is what the running command actually reads, which
is the thing being audited. The cost is that `path self | path dirname`
shows up already resolved and a type annotation is lost — the same class
of loss as the rebuilt `def` header, and documented next to it.

Not every constant was written as one, and two of those would be wrong
to print: `$nu`, and the record `use <module>` binds under the module's
own name (its declaration span is the `use` call — printing it by span
gave the literal `const use = {...}`). A constant is shown exactly when
the span it was declared at spells the name it is bound under. A
constant declared inside a printed body is not repeated, same as a
nested `def`.

The flag applies to a custom command; on an alias, a module, a closure
or a block id it does nothing. Without the flag the output is
byte-identical to before.

The first commit is a pure extraction with no behaviour change: it lifts
the `def` renderer out of `run` into `render_def` so the dependency loop
can call it. Checking that one with `git diff --color-moved` leaves the
two `feat` commits as the actual new logic.

## User-facing changes (Release notes)

Added `--dependencies` (`-d`) to `view source`. It appends the source of
every custom command the target calls, transitively — including commands
private to a module, which cannot be viewed any other way — and prepends
every constant those bodies read, with the value the engine holds:

```nushell
module m { const LIMIT = 42; def helper [] { $LIMIT }; export def bar [] { helper } }
use m
view source "m bar" --dependencies
# => const LIMIT = 42
# =>
# => def "m bar" [] { helper }
# =>
# => def helper [] { $LIMIT }
```

## Additional notes

Design feedback welcome on the flag name and on printing a module's
`main` under its defining name.

Noticed while working here, pre-existing on `main` and deliberately left
alone: three of the existing `examples()` for `view source` carry
`result:` strings that do not match what the command prints
(`...rest:string` rendered where the example claims `...rest: string`,
and a trailing space in the module example).
That is why this file still has no `test_examples` block — adding one
would fail on those three and turn this into a mixed PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-02 16:48:24 -05:00
Firegem 7b4e56a704 Include UTC offset in date list-timezone output (#18922)
## Description
Adds the current UTC offset of each timezone in `date list-timezone` as
a separate column.

## User-facing changes (Release notes)
Include UTC offset in `date list-timezone` output.

## Additional notes
Inspired by #18920. The offset is formatted the same as it would be when
passing a datetime to `into record` and getting its offset column.
Shanghai (used previously in the example) doesn't use DST, so should
always remain `+08:00` to my knowledge.
2026-09-02 16:47:48 -05:00
Darren Schroeder 2af17cd99e bump reedline to a8e9364 (#18959)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
This PR bumps nushell to the latest reedline commit a8e9364
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-02 10:03:07 -05:00
luangucun 07857458b2 each while: preserve errors instead of silently stopping (#18958)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->



In this PR, I fixed an issue where `each while` silently treated closure
and ByteStream errors as the end of iteration.

`each while` uses `map_while`, where returning `None` means that
iteration has finished. The previous implementation converted both
closure errors and ByteStream chunk errors into `None`, causing errors
to be lost and output to be silently truncated.

The implementation now preserves these errors as `Value::error`. Only
`Value::Nothing` stops iteration.

A regression test covers closure errors:

```nushell
[1 2 3] | each while {|x|
    if $x == 2 {
        error make {msg: "boom"}
    } else {
        $x
    }
}
```




## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->

Fixed an issue where each while silently stopped when the closure or
input ByteStream produced an error. These errors are now preserved and
reported.


## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->

Added a regression test for closure error handling.
2026-09-02 08:20:37 -05:00
Ted Lukin fcd415d4ea fix improper cant convert error in path-relative-to (#18792)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->
Then:
```nu
  × Can't convert to prefix not found.
   ╭─[repl_entry #11:1:1]
 1 │ "/home/pheenty/" | path relative-to "/home/pheenty/git"
   · ────────┬───────
   ·         ╰── can't convert string to prefix not found
```
Now:
```nu
  × The argument path is not a parent of the input path.
   ╭─[repl_entry #1:1:1]
 1 │ "/home/pheenty/" | path relative-to "/home/pheenty/git"
   · ────────┬───────
   ·         ╰── prefix not found
```

Also changed two huge and almost identical `#[cfg(windows)]` and
`#[cfg(not(windows))]` code blocks to just have three `if cfg!(windows)`
inside while at was at it

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->
Fixed `path relative-to` providing improper error messages when its
argument was not a parent of the input.

<!--
## Additional notes
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-09-02 08:15:32 -05:00
user77 cbb333386d Don't print a stray blank line when try with catch or finally collects an external (#18811)
# Description

Fixes #18765. Byte for byte, before:

```
> nu -c "try { ^nu -c 'print hi' } catch {}" | od -c
0000000   h   i  \n  \n
```

and after:

```
0000000   h   i  \n
```

Since 7f69d752, a `try` block followed by `catch` or `finally` collects
the block's output first, so it can tell whether the block failed before
anything starts streaming. If the tried command is an external whose
stdout was not captured (it is inherited at the statement level, or
redirected to a file inside the block), the output has already left the
process by the time the collect runs. The collect then converted that
data-less child stream into an empty string value, and printing the
collected result rendered the empty string as an extra blank line.

The fix is in the shared `collect` helper in `eval_ir.rs`: when the
collected data is a byte stream whose child has no captured stdout, wait
for the child and produce `Empty`, which is exactly what the plain `try
{ }` path produces when it drains the same stream. Waiting keeps the
failure semantics: a non-zero exit still becomes an error, so `catch`
still runs (covered by a test).

Behavior that did not change, verified against an unpatched build:

- Value context still collects and trims the captured output: `let x =
(try { ^cmd } catch {})` still gives the trimmed string.
- `$env.LAST_EXIT_CODE` was not set by the collect path before and still
is not.

Credit where due: neurolag bisected the inconsistency to 7f69d752, and
weirdan showed it is the collection step that differs.

# User-Facing Changes

`try { ^external } catch { }` and `try { ^external } finally { }` no
longer print a stray blank line after the external's output. Collecting
an uncaptured external (for example `try { ^cmd o> file } catch {}` as
the value of an assignment) now produces nothing instead of an empty
string.

# Tests + Formatting

Added `try_catch_inherited_external_output_has_no_extra_blank_line` in
`tests/shell/mod.rs`. It spawns the real `nu` binary and compares raw
stdout bytes for the `catch`, `finally`, and `catch` plus `finally`
cases, plus a failing external to prove `catch` still runs. The `try`
sits in final statement position on purpose: only the final statement's
value is printed, so that is the position where the fabricated empty
string became visible. The test fails on current main with exactly the
extra `\n` and passes with this change.

- `cargo fmt --all -- --check` clean
- `cargo clippy --workspace --all-targets -- -D warnings` clean
- `shell::` suite 255 passed, `commands::try_::` suite 41 passed
(includes the pipefail experimental tests)
- `cargo check -p nu-engine --target wasm32-unknown-unknown
--no-default-features` compiles (the new block is gated on the `os`
feature)

# After Submitting

## Release notes summary - What our users need to know

`try` with a `catch` or `finally` block no longer prints a stray blank
line after an external command's output.
2026-09-02 08:10:22 -05:00
David Bateman 6b6a434f01 fix(env): normalize PATH when refreshing ENV_CONVERSIONS (#18832)
## Description
Refreshing `$env.ENV_CONVERSIONS` already reapplies configured
`from_string` conversions to string environment variables. However, the
built-in `PATH` normalization was only performed during startup, so an
importer such as `load-env` could leave `PATH` as a string after the
refresh.

This change makes the existing `ENV_CONVERSIONS` refresh path also
perform the built-in `PATH` normalization. It also documents the refresh
pattern on `load-env`:

  ```nushell
  direnv export json | from json | default {} | load-env
  $env.ENV_CONVERSIONS = $env.ENV_CONVERSIONS
  ```

Regression tests cover configured conversions on imported values and
platform-specific `PATH` normalization.

## User-facing changes (Release notes)

Refreshing `$env.ENV_CONVERSIONS` now also normalizes `PATH` into its
usual list form. The `load-env` help documents how to refresh
environment conversions after importing string values.

## Additional notes

Closes #18766
2026-09-02 08:08:38 -05:00
3440fdf1f9 Add completions.persistent_menus config option (#18573)
<!-- Title suggestion: Add `completions.persistent_menus` config option
-->

**Disclosure:** the code was written by an AI agent (Claude) under my
direction; I can't review Rust line-by-line myself. What was verified so
far: `toolkit fmt` and clippy (`-D warnings -D clippy::unwrap_used`) on
the touched crates, plus manual behavior checks in a live build with
both flag values; full `toolkit check pr` will run once the reedline
dependency is bumped. I've wanted this behavior for a long time and
drove the design decisions. Please review accordingly.

## Description

With a menu open, erasing the characters you typed to filter it
dismisses the menu: immediately on the first backspace when
`completions.quick` is on (the default), or once the commandline becomes
empty otherwise. Both closes are hardcoded in reedline, and no config
could prevent them. Erasing the filter is a natural part of browsing
completions — narrowing too far and backing up shouldn't throw the menu
away, especially since opening a menu on an empty commandline is already
valid and shows all values.

This PR adds `$env.config.completions.persistent_menus` (bool, default
`false` = old behavior) and wires it to the new reedline option
`with_persistent_menus`
[nushell/reedline#1118](https://github.com/nushell/reedline/pull/1118).
With `true`, edits refilter an active menu instead of closing it; the
menu closes on Esc, Ctrl-C, or when a value is accepted.

## User-facing changes (Release notes)

Added `$env.config.completions.persistent_menus`. When set to `true`, an
active completion or history menu stays open while you edit: erasing
characters (or emptying the commandline) refilters the menu instead of
closing it. Default `false` keeps the old behavior.

```nushell
$env.config.completions.persistent_menus = true
```

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-02 08:04:14 -05:00
Bob fbff11de08 fix keybindings listen - ignore KeyEventState when checking for Esc (#18867)
<!--
Thanks for contributing to Nushell!

Before submitting, please read the contributing guide:
https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md

This template helps reviewers understand your changes and allows us to
generate high-quality release notes.
-->

## Description
<!--
Explain what this PR does and why.

This section is intentionally flexible:
- Describe the problem
- Explain your approach
- Include technical details if relevant

Good examples:
- "In this PR, I fixed..."
- "In this PR, I added support for..."
- "This change improves X by..."

Write as much or as little as needed for reviewers to understand your
changes.
-->
In some contexts (seemingly, when the Kitty keyboard protocol is enabled
and supported by the terminal emulator), it's possible for `keybindings
listen` to not quit when pressing `Esc` if NumLock (and maybe caps lock)
are turned on.
The existing "check for Escape" logic checks that (among other things)
`KeyEventState` is `NONE`. This change relaxes precisely the
`KeyEventState` check, so e.g. Ctrl+Escape is still reported and doesn't
quit `keybindings listen`, but Escape by itself exits, even when NumLock
is reported.

## User-facing changes (Release notes)
<!--
This section is used (mostly as-is) for https://www.nushell.sh/blog/

Describe how Nushell behavior changes from a user's perspective.
Do NOT describe internal Rust changes here.

Write in a release note style, for example:
- "Added support for..."
- "Fixed an issue where..."
- "Nushell now supports..."
- "Improved performance of..."

If your changes do NOT affect users (internal refactors, cleanup, etc.),
just write:
- "n/a"
- "nan"
- or similar

This tells us the change should not appear in the changelog.

Tips:
- Focus on observable behavior
- Include examples if helpful
- Keep it concise

You can:
- Write a short paragraph (will appear as a bullet point), OR
- Use headings (###) if your change needs more structure

Avoid writing things like:
- "In this PR, I refactored..."
- "This updates internal code..."

You may leave this blank until the PR is ready.
-->
Fixed an issue in `keybindings listen` where `Esc` wouldn't quit if a
state (e.g. `NumLock` or `CapsLock`) was reported.

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
potentially fixes #14919
2026-09-02 08:02:49 -05:00