nushell/nushell
Auf GitHub ansehenChange columns flag of `update cells` into a rest argument
Open
#15.477 geöffnet am 2. Apr. 2025
category:deprecationcategory:enhancementcategory:inconsistent-behaviorhelp wanted
Repository-Metriken
- Stars
- (39.478 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 4T 1h) (123 gemergte PRs in 30 T)
Beschreibung
Related problem
Some commands (such as the into commands) can update specific cells if cell paths are specified after the command body. update cells has a similar behavior, but selects these cells with a --columns flag instead of rest arguments.
Describe the solution you'd like
Change columns flag of update cells into a rest argument. For example:
[[name val1 val2]; [foo 1 4] [bar 8 3]] | update cells -c [val1 val2] { $in * 2 }
# => ╭───┬──────┬──────┬──────╮
# => │ # │ name │ val1 │ val2 │
# => ├───┼──────┼──────┼──────┤
# => │ 0 │ foo │ 2 │ 8 │
# => │ 1 │ bar │ 16 │ 6 │
# => ╰───┴──────┴──────┴──────╯
is changed to:
[[name val1 val2]; [foo 1 4] [bar 8 3]] | update cells { $in * 2 } val1 val2
# => ╭───┬──────┬──────┬──────╮
# => │ # │ name │ val1 │ val2 │
# => ├───┼──────┼──────┼──────┤
# => │ 0 │ foo │ 2 │ 8 │
# => │ 1 │ bar │ 16 │ 6 │
# => ╰───┴──────┴──────┴──────╯
The --columns flag should be deprecated, and eventually removed.
Describe alternatives you've considered
No response
Additional context and details
No response