Repository navigation
Turn on native-clip and cell-path-types by default - #19634
Merged
Merged
Conversation
Both experimental options have been opt-in for more than three months, so they become opt-out. dc-glob stays opt-in. This also fixes bugs that were reachable only with an option turned on: - cell-path-types typed `$list.5?` as the element type, so `let x: nothing = $list.5?` failed to parse. A path with a `?` member is now typed `oneof<T, nothing>`. - On Linux, `clip copy` ignored `$env.config.clip.resident_mode = false`. The legacy `plugins.clip.NO_RESIDENT` key now overrides the setting only when it is set. - If the clipboard holder thread fails to start, `clip copy` returns an error instead of panicking. Tests: the mut_ tests pin CELL_PATH_TYPES, the clip completion test is no longer ignored, and there are new parser tests for optional cell paths and unit tests for the resident-mode setting.
fdncred
added a commit
that referenced
this pull request
Nov 23, 2026
#19645) ## Description `repl::test_engine::const_switch_rejects_a_value_that_is_not_a_bool` fails on main (1dc849d), and so does every PR's root test job. #19638 added the test. Two PRs merged a few minutes before it changed what the test expects, and each of the three passed CI on its own base: - #19634 turned on `cell-path-types`, so the parser now knows `$r.a` in `const r = {a: 5}` is an `int`. It rejects `--chars=$r.a` with a type mismatch and never evaluates the const. - #19635 moved errors from parse-time evaluation out of `ParseError::LabeledError` and into the new `ParseError::ParseTimeEval`. The test covers the check #19638 added to const evaluation, so it needs an argument the parser can't type. It now passes `($r | get a)`. `get` returns `any`, so the parser lets it through and the const evaluation rejects it. The test matches the `CantConvert` inside `ParseTimeEval`, the same way `builtin_switch_rejects_a_value_that_is_not_a_bool` matches its error. ## 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. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR changes two experimental options from opt-in to opt-out, so they're on by default. Both have been opt-in for more than three months.
native-cliparrived in 0.110.1, tracked in Experimental Option Tracking: native-clip #17665. It adds the built-inclip copyandclip pastecommands, which use the OS clipboard API instead of OSC 52.cell-path-typesarrived in 0.111.1, tracked in Experimental Option Tracking: cell-path-types #17683. It infers the types of cell paths like$foo.a.bat parse time, so the parser reports a type mismatch before the script runs.dc-globis old enough too, but it stays opt-in for now.Since both options are now on for everyone, this PR also fixes three bugs that were reachable only with an option turned on:
cell-path-typestyped an optional path like$list.5?as the element type,int, solet x: nothing = $list.5?failed to parse. Now a path with any?member is typedoneof<int, nothing>.clip copyalways used the background clipboard thread, because$env.config.clip.resident_mode = falsewas ignored. The setting now works, and the oldplugins.clip.NO_RESIDENTkey still overrides it when set.clip copypanicked. Now it returns an error.User-facing changes (Release notes)
native-clipexperimental option is now on by default.clip copyandclip pasteare built-in commands that use the system clipboard directly.use std/clipstill adds the OSC 52 commandsclip copy52andclip paste52."text" | clipon Windows, which used to runclip.exe. Nowclipis the built-in command and that line fails to parse. Useclip copy, or^clipto runclip.exe.cell-path-typesexperimental option is now on by default. Nushell infers the type of cell paths such as$record.fieldwhile parsing, so assigning one to a variable of the wrong type fails before the script runs. Before, the error appeared only when the line ran.$env.config.clip.resident_mode = falsenow turns off the background clipboard thread.nu --experimental-options '[native-clip=false, cell-path-types=false]', or setNU_EXPERIMENTAL_OPTIONS=native-clip=false,cell-path-types=falsefor sessions that load your config.Additional notes