Repository navigation
Take update cells columns as rest arguments and deprecate --columns - #19125
Merged
Merged
Conversation
fdncred
reviewed
Oct 16, 2026
Contributor
There was a problem hiding this comment.
Review overview
🟡 Changes recommended
Moving -c $cols to ...$cols, as the deprecation help says to, changes what an empty list does, and the deprecation names a release that already shipped without it.
Findings: 1
Open (5)
An empty...$colsupdates every column, where-c $colsupdated nonesince: "0.116.0"names a release that shipped without this deprecation Nothing tests--columnsnow that its only example uses rest arguments Rest arguments reject int column names that-caccepts The rest parameter and the deprecated flag are both namedcolumns
Notes from my clanker, checked on fe3812c. The PR applies cleanly onto main at 430207e. I built nu from that and ran the commands quoted in the comments against it.
…mns in update cells An empty spread like `...[]` now updates no columns, the same as `-c []`. Rest columns go through the same string coercion as the flag, so int column names work either way. The rest parameter is renamed to `rest` and the deprecation is marked as 0.117.0.
Cover the deprecated --columns flag, merging it with rest columns, empty column lists and int column names.
Shub3am
force-pushed
the
update-cells-rest-columns
branch
from
October 21, 2026 11:13
fe3812c to
4ccf95f
Compare
Contributor
Author
Contributor
|
Thanks |
Contributor
|
Thanks for the credits, i was very busy with other work could not continue, nice work |
fdncred
pushed a commit
to nushell/nu_scripts
that referenced
this pull request
Nov 12, 2026
`update cells --columns` is deprecated in Nushell 0.117.0 in favor of columns as rest arguments (nushell/nushell#19125). This updates `gh my stars` to `update cells { $in | into datetime } starredAt`. Tested with nu 0.117.0: `gh my stars` runs with no deprecation warning.
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
update cellsnow takes the columns to update as rest arguments, and--columnsis deprecated. That's the direction agreed in #15477 and matchesselect,rejectand theintocommands.This picks up #17815, which was closed because the author stopped responding (credit to @tauanbinato for the original change). I rebased the idea onto current main, which also has
--recursivenow, and made the follow-up changes @fdncred asked for there:update cells -c [...]calls incrates/nu-std/tests/test_std-rfc_tables.nunow use rest argumentsopentest incrates/nu-command/tests/commands/open.rsalready uses no-c, so it didn't need a changeA couple of details:
--columnsstill works and shows the deprecation warning on first use. If someone passes both, the two lists are merged.-c []still means "update no columns", and an empty spread like...$colswith$cols = []means the same. Only calling it with no flag and no columns at all updates everything, same as before.rest, likeselectandreject, so it doesn't share a name with the deprecated--columnsflag.-c, so int column names work either way (let cols = [1]; {"1": 1} | update cells { $in + 1 } ...$cols).sinceis0.117.0, since 0.116.0 shipped without it.Checked with a local build:
The converted example fails on main with
ExtraPositionaland passes here. The new tests incrates/nu-cmd-extra/tests/commands/filters/update_cells.rscover--columns, merging it with rest columns, empty column lists and int column names.cargo fmt --all -- --check,cargo clippy -p nu-cmd-extra --all-targets -- -D warnings,cargo test -p nu-cmd-extraand the std test suite (testing run-tests --path crates/nu-std, 251 tests) all pass.User-facing changes (Release notes)
Pass column names directly to
update cellsupdate cellsnow accepts column names as rest arguments, matchingselect,reject, and theintocommands. The--columns(-c) flag is deprecated but still works, with a warning on first use. Replace the flag and list with column names after the closure:Additional notes
closes #15477