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
Copy file name to clipboardExpand all lines: blog/2024-07-23-nushell_0_96_0.md
+51-1Lines changed: 51 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,12 +86,36 @@ A...B
86
86
87
87
The `group` command has been deprecated in favor of the new `chunks` command in [#13377](https://github.com/nushell/nushell/pull/13377). The hope is that the name "chunks" is more descriptive or intuitive compared to "group" so that users can more easily find the command they are looking for. `chunks` behaves exactly like `group` except that it will error if provided a chunk size of zero.
88
88
89
+
### `watch --quiet`[[toc](#table-of-content)]
90
+
91
+
https://github.com/nushell/nushell/pull/13415
92
+
93
+
Thanks to [@Zoybean](https://github.com/Zoybean) in [#13415](https://github.com/nushell/nushell/pull/13415), the `watch` command now has a `--quiet` flag which will prevent the initial watch message from being shown.
94
+
89
95
### `char nul`[[toc](#table-of-content)]
90
96
91
97
Thanks to [@weirdan](https://github.com/weirdan) in [#13241](https://github.com/nushell/nushell/pull/13241), the NUL character (0x0) is now available via `char nul`, `char null_byte`, or `char zero_byte`.
92
98
93
99
## Breaking changes [[toc](#table-of-content)]
94
100
101
+
### `generate`[[toc](#table-of-content)]
102
+
103
+
To support default closure parameters, the argument order for `generate` has been reversed. Instead of the initial value followed by the closure, `generate` now takes a closure followed by an initial value ([#13393](https://github.com/nushell/nushell/pull/13393)).
104
+
105
+
For example, using a closure with a default parameter:
The naming for default columns in `from csv`, `from tsv`, and `from ssv` was changed from 1-based indexing to 0-based indexing in [#13209](https://github.com/nushell/nushell/pull/13209) thanks to [@ito-hiroki](https://github.com/ito-hiroki). I.e., instead of:
@@ -182,7 +206,29 @@ The `--numbered` flag on `for` has been removed in [#13239](https://github.com/n
182
206
183
207
## Other changes [[toc](#table-of-content)]
184
208
185
-
### `to json`[[toc](#table-of-content)]
209
+
### `http` commands [[toc](#table-of-content)]
210
+
211
+
The data provided to the `http` family of commands (`post`, `put`, `patch`, `delete`) could previously only be supplied as a positional argument. But after [#13254](https://github.com/nushell/nushell/pull/13254), these commands now support taking data as pipeline input. This also means that these commands can now stream the input data over the network!
212
+
213
+
```nushell
214
+
# non-streaming version, content-type is automatically set
215
+
open test.json | http post https://httpbin.org/post
216
+
217
+
# streaming version, content-type needs to be set manually
218
+
open --raw test.json | http post -t application/json https://httpbin.org/post
219
+
```
220
+
221
+
### `metadata set --content-type`[[toc](#table-of-content)]
222
+
223
+
To implement automatic content-type detection, a new metadata field, the `content-type`, was added to pipeline outputs in [#13284](https://github.com/nushell/nushell/pull/13284). This field can be manually set using `metadata set` with the `--content-type` flag. Using this, we could have rewritten the streaming `http post` example above as:
Thanks to [@drmason13](https://github.com/drmason13) in [#133523](https://github.com/nushell/nushell/pull/13352), `to json` now places braces on the same line instead of on a new line.
188
234
@@ -205,6 +251,10 @@ Thanks to [@suimong](https://github.com/suimong) in [#13246](https://github.com/
205
251
The signature of the `do` command has been fixed in [#13216](https://github.com/nushell/nushell/pull/13216) thanks to [@NotTheDr01ds](https://github.com/NotTheDr01ds). The first parameter is now correctly typed as a `closure` instead of `any`, and this should allow for
206
252
better compile-time checks/safety.
207
253
254
+
### `into datetime`[[toc](#table-of-content)]
255
+
256
+
Thanks to [@hqsz](https://github.com/hqsz) in [#13289](https://github.com/nushell/nushell/pull/13289), `into datetime` can now take date strings without a timezone in combination with the `--format` flag.
257
+
208
258
### `from toml`[[toc](#table-of-content)]
209
259
210
260
Thanks to [@ito-hiroki](https://github.com/ito-hiroki) in [#13315](https://github.com/nushell/nushell/pull/13315), `from toml` now correctly handles toml date values in more cases.
0 commit comments