We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not a question, nor a defect nor a feature request, but more of a documentation update.
In https://www.nushell.sh/book/nushell_map.html, there is no example of upsert/update for powershell, while there could be one.
For example, in nushell, I can write:
open Cargo.toml | update package.version 1.0.0 | save --force Cargo.toml
While I have to write the following in powershell:
Get-Content Cargo.toml | ConvertFrom-Toml | ForEach-Object {$_.package.version = "1.0.0"; $_} | ConvertTo-Toml -Depth 20
So the equivalent of update would be ForEach-Object {$_.path.to.update = "new value"; $_}.
update
ForEach-Object {$_.path.to.update = "new value"; $_}
Yes, this makes nushell even nicer :D
Note that the example given uses a powershell plugin to handle TOML, but the example would be the same with a json file and without plugins.
The text was updated successfully, but these errors were encountered:
Thanks. Feel free to add this to our documentation. I'll move this issue over to our docs repo.
Sorry, something went wrong.
No branches or pull requests
Question
Not a question, nor a defect nor a feature request, but more of a documentation update.
In https://www.nushell.sh/book/nushell_map.html, there is no example of upsert/update for powershell, while there could be one.
For example, in nushell, I can write:
While I have to write the following in powershell:
So the equivalent of
update
would beForEach-Object {$_.path.to.update = "new value"; $_}
.Yes, this makes nushell even nicer :D
Additional context and details
Note that the example given uses a powershell plugin to handle TOML, but the example would be the same with a json file and without plugins.
The text was updated successfully, but these errors were encountered: