Open fdncred opened 1 year ago
Could it be related to this PR? https://github.com/nushell/nushell/pull/7318
Could it be related to this PR? https://github.com/nushell/nushell/pull/7318
maybe? @webbedspace what do you think?
btw, this is also true for upsert
:
> [[a b]; [1 2] [3 4]] | upsert b 5
╭───┬───┬───╮
│ # │ a │ b │
├───┼───┼───┤
│ 0 │ 1 │ 5 │
│ 1 │ 3 │ 5 │
╰───┴───┴───╯
@fdncred - interesting: $t.0.b = 5
works but $t.b.0 = 5
doesn't
maybe? @webbedspace what do you think?
Both this and upsert
just rely on Value.upsert_data_at_cell_path()
, so it should be an easy fix to tweak that.
Both this and upsert just rely on Value.upsert_data_at_cell_path(), so it should be an easy fix to tweak that.
Thanks for the feedback @webbedspace. Would you be willing to try and fix this behavior?
I'll do it… after #7309.
On 0.85.1, I'm still getting this $t.0.b = 5
works but $t.b.0 = 5
doesn't
Describe the bug
how is
mut
supposed to work here? This seems off to me.while this works to update column b index 0 to 5, it seems like it should be
$t.b.0 = 5
but that givesi get the same error with
$t.0.b = 5
It gets a little worse when you table has more than one row.
I could acutally live with this one because it seems like the intent is to assign 5 to all of column b.
How to reproduce
see above
Expected behavior
$t.b.0
= 5 to workScreenshots
No response
Configuration
Additional context
No response