Files
Darren Schroeder 7e1fe77d46 Turn on native-clip and cell-path-types by default (#19634)
## 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-clip` arrived in 0.110.1, tracked in #17665. It adds the
built-in `clip copy` and `clip paste` commands, which use the OS
clipboard API instead of OSC 52.
- `cell-path-types` arrived in 0.111.1, tracked in #17683. It infers the
types of cell paths like `$foo.a.b` at parse time, so the parser reports
a type mismatch before the script runs.

`dc-glob` is 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-types` typed an optional path like `$list.5?` as the
element type, `int`, so `let x: nothing = $list.5?` failed to parse. Now
a path with any `?` member is typed `oneof<int, nothing>`.
- On Linux, `clip copy` always used the background clipboard thread,
because `$env.config.clip.resident_mode = false` was ignored. The
setting now works, and the old `plugins.clip.NO_RESIDENT` key still
overrides it when set.
- If the OS refused to start that thread, `clip copy` panicked. Now it
returns an error.


## User-facing changes (Release notes)

- The `native-clip` experimental option is now on by default. `clip
copy` and `clip paste` are built-in commands that use the system
clipboard directly. `use std/clip` still adds the OSC 52 commands `clip
copy52` and `clip paste52`.
- This breaks `"text" | clip` on Windows, which used to run `clip.exe`.
Now `clip` is the built-in command and that line fails to parse. Use
`clip copy`, or `^clip` to run `clip.exe`.
- The `cell-path-types` experimental option is now on by default.
Nushell infers the type of cell paths such as `$record.field` while
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.
- On Linux, `$env.config.clip.resident_mode = false` now turns off the
background clipboard thread.
- To get the old behavior, turn either option off with `nu
--experimental-options '[native-clip=false, cell-path-types=false]'`, or
set `NU_EXPERIMENTAL_OPTIONS=native-clip=false,cell-path-types=false`
for sessions that load your config.

## Additional notes
2026-11-23 08:26:54 -06:00
..