You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To update, you'll need to take the whole structure in via the pipeline, and then have the user pass the field to update (you can see inc for an example of doing this)
To get the current value at the given field path (taken from inc):
I think update makes the most sense, as in "functional record update", since one is not actually modifying any fields. edit, set, and put are all (at least, more) implicative of modification.
Activity
[-]Edit[/-][+]Edit cell functionality[/+]sophiajt commentedon Jun 2, 2019
Example in practice:
The verb
updateis another possibilityDanielRosenwasser commentedon Aug 8, 2019
I like
update, but how do you get a handle to the larger structure being updated, as well as the current value?sophiajt commentedon Aug 11, 2019
@DanielRosenwasser - There are a couple convenience methods.
To update, you'll need to take the whole structure in via the pipeline, and then have the user pass the field to update (you can see
incfor an example of doing this)To get the current value at the given field path (taken from
inc):And to update the value at the given field path:
The
replace_data_at_pathwill replace the previous data with the new data and return the whole structure.rrichardson commentedon Sep 4, 2019
what about
putas a verb for this? to complementget?waldyrious commentedon Sep 4, 2019
Another option could be
set.sophiajt commentedon Sep 5, 2019
Now that we have
editas the feature, we may want to change this to figuring out the name for it.[-]Edit cell functionality[/-][+]Name of command to edit cell[/+]rrichardson commentedon Sep 5, 2019
When it comes to changing the values within an existing column of a table, "edit" makes sense.
I think
setmakes sense as well and it's a bit shorter.strega-nil commentedon Sep 5, 2019
I think
updatemakes the most sense, as in "functional record update", since one is not actually modifying any fields.edit,set, andputare all (at least, more) implicative of modification.wycats commentedon Sep 10, 2019
I think
updateis pretty nice, and makes sense both in programming terms and in human terms.waldyrious commentedon May 16, 2020
For future reference,
editwas renamed toupdatein #1724 (released in nu 0.14.0).Merge pull request nushell#62 from elferherrera/lines
Merge pull request nushell#62 from jonstodle/update-commands
feat!: Explicit cell-path case sensitivity syntax (#15692)