Skip to content

Commit a043ade

Browse files
committed
Continue release notes
1 parent dd6d84e commit a043ade

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

blog/2024-07-23-nushell_0_96_0.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,36 @@ A...B
8686

8787
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.
8888

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+
8995
### `char nul` [[toc](#table-of-content)]
9096

9197
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`.
9298

9399
## Breaking changes [[toc](#table-of-content)]
94100

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:
106+
107+
```nushell
108+
> generate {|fib=[0, 1]| { out: $fib.0, next: [$fib.1, ($fib.0 + $fib.1)] } } | skip 2 | take 6
109+
╭───┬────╮
110+
│ 0 │ 1 │
111+
│ 1 │ 2 │
112+
│ 2 │ 3 │
113+
│ 3 │ 5 │
114+
│ 4 │ 8 │
115+
│ 5 │ 13 │
116+
╰───┴────╯
117+
```
118+
95119
### Default column numbering [[toc](#table-of-content)]
96120

97121
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
182206

183207
## Other changes [[toc](#table-of-content)]
184208

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:
224+
225+
```nushell
226+
open --raw test.json
227+
| metadata set --content-type application/json
228+
| http post https://httpbin.org/post
229+
```
230+
231+
### `to json` [[toc](#table-of-content)] [[toc](#table-of-content)]
186232

187233
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.
188234

@@ -205,6 +251,10 @@ Thanks to [@suimong](https://github.com/suimong) in [#13246](https://github.com/
205251
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
206252
better compile-time checks/safety.
207253

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+
208258
### `from toml` [[toc](#table-of-content)]
209259

210260
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

Comments
 (0)