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
@@ -71,6 +71,117 @@ There may be (hopefully) minor breaking changes due to the startup configuration
71
71
72
72
With [#14295](https://github.com/nushell/nushell/pull/14295), dates can now be added to durations. Previously only durations could be added to dates.
73
73
74
+
### `group-by`
75
+
76
+
::: warning Breaking change
77
+
See a full overview of the [breaking changes](#breaking-changes)
78
+
:::
79
+
80
+
Thanks to [@Bahex](https://github.com/Bahex) in [#14337](https://github.com/nushell/nushell/pull/14337), the `group-by` command now supports grouping by multiple criteria (henceforth referred to as grouper).
81
+
When using multiple groupers, the output is in the form of nested records.
With the `--to-table` flag, instead of nested records, the output is in the form of a table with columns corresponding to each grouper and the `items` column.
126
+
Each column corresponding to a `grouper` is named after it. For closure groupers, the columns are named with the scheme `closure_{i}`.
Thanks to [@Bahex](https://github.com/Bahex) in [#14303](https://github.com/nushell/nushell/pull/14303), this release adds the `path self` command.
163
+
`path self` is a parse-time only command for getting the absolute path of the source file containing it, or any file relative to the source file.
164
+
165
+
```nushell
166
+
const this_file = path self
167
+
const this_directory = path self .
168
+
```
169
+
170
+
### `term query`
171
+
Thanks to [@Bahex](https://github.com/Bahex) in [#14427](https://github.com/nushell/nushell/pull/14427), this release adds the `term query` command.
172
+
`term query` allows sending a query to your terminal emulator and reading the reply.
173
+
174
+
```nushell
175
+
# Get cursor position
176
+
term query (ansi cursor_position) --prefix (ansi csi) --terminator 'R'
@@ -124,6 +235,47 @@ To make the deferred evaluation more explicit, the `timeit` command can now only
124
235
125
236
The `cpu_usage` column outputted by `sys cpu` works by sampling the CPU over a 400ms period. This wait long time is unhelpful if you are only interested in other information about the CPU like the number of cores (i.e., `sys cpu | length`). With [#14485](https://github.com/nushell/nushell/pull/14485), the `cpu_usage` column is now gated behind the `--long` flag. This way, `sys cpu` will take around 0-2ms instead of 400ms by default.
126
237
238
+
### `from csv` and `from tsv`
239
+
Thanks to [@Bahex](https://github.com/Bahex) in [#14399](https://github.com/nushell/nushell/pull/14399), parsing csv and tsv content with the `--flexible` flag is more flexible than before.
240
+
Previously, the first row of csv or tsv content would determine the number of columns, and rows containing more values than the determined columns would be truncated, losing those extra values.
241
+
242
+
With this release, that is no longer the case.
243
+
Now, `--flexible` flag means the number of columns aren't limited by the first row and can have not just less but also more values than the first row.
244
+
245
+
```csv
246
+
value
247
+
1,aaa
248
+
2,bbb
249
+
3
250
+
4,ddd
251
+
5,eee,extra
252
+
```
253
+
```nu
254
+
.. | from csv --flexible --noheaders
255
+
```
256
+
```
257
+
╭─#─┬─column0─┬─column1─┬─column2─╮
258
+
│ 0 │ value │ ❎ │ ❎ │
259
+
│ 1 │ 1 │ aaa │ ❎ │
260
+
│ 2 │ 2 │ bbb │ ❎ │
261
+
│ 3 │ 3 │ ❎ │ ❎ │
262
+
│ 4 │ 4 │ ddd │ ❎ │
263
+
│ 5 │ 5 │ eee │ extra │
264
+
╰─#─┴─column0─┴─column1─┴─column2─╯
265
+
```
266
+
267
+
### `std/iter scan`
268
+
269
+
Thanks to [@Bahex](https://github.com/Bahex) in [#14596](https://github.com/nushell/nushell/pull/14596), the order of `scan`'s closure's parameters are flipped to be consistent with `reduce`.
270
+
The closure now also receives the accumulator value as pipeline input as well.
271
+
272
+
```nushell
273
+
> [a b c d] | iter scan "" {|x, y| [$x, $y] | str join} -n
274
+
# To keep its behavior same, this command should be changed to either of the following
275
+
> [a b c d] | iter scan "" {|it, acc| [$acc, $it] | str join} -n
276
+
> [a b c d] | iter scan "" {|it| append $it | str join} -n
277
+
```
278
+
127
279
## Deprecations
128
280
129
281
### `split-by`
@@ -172,20 +324,19 @@ Thanks to all the contributors below for helping us solve issues, improve docume
172
324
|[@132ikl](https://github.com/132ikl)|Change tests which may invoke externals to use non-conflicting names|[#14516](https://github.com/nushell/nushell/pull/14516)|
<!-- |[@Bahex](https://github.com/Bahex)|Add `path self` command for getting absolute paths to files at parse time|[#14303](https://github.com/nushell/nushell/pull/14303)| -->
176
-
<!-- |[@Bahex](https://github.com/Bahex)|add multiple grouper support to `group-by`|[#14337](https://github.com/nushell/nushell/pull/14337)| -->
177
327
328
+
|[@Bahex](https://github.com/Bahex)|Add `path self` command for getting absolute paths to files at parse time|[#14303](https://github.com/nushell/nushell/pull/14303)|
329
+
|[@Bahex](https://github.com/Bahex)|add multiple grouper support to `group-by`|[#14337](https://github.com/nushell/nushell/pull/14337)|
178
330
|[@Bahex](https://github.com/Bahex)|fix(group-by): re #14337 name collision prevention|[#14360](https://github.com/nushell/nushell/pull/14360)|
<!-- |[@Bahex](https://github.com/Bahex)|Add `term query`, for querying information from terminals.|[#14427](https://github.com/nushell/nushell/pull/14427)| -->
<!-- |[@Bahex](https://github.com/Bahex)|Propagate existing errors in insert and merge|[#14453](https://github.com/nushell/nushell/pull/14453)| -->
184
-
<!-- |[@Bahex](https://github.com/Bahex)|lsp and --ide-check fix for `path self` related diagnostics|[#14538](https://github.com/nushell/nushell/pull/14538)| -->
|[@Bahex](https://github.com/Bahex)|Add `term query`, for querying information from terminals.|[#14427](https://github.com/nushell/nushell/pull/14427)|
|[@Bahex](https://github.com/Bahex)|Propagate existing errors in insert and merge|[#14453](https://github.com/nushell/nushell/pull/14453)|
335
+
|[@Bahex](https://github.com/Bahex)|lsp and --ide-check fix for `path self` related diagnostics|[#14538](https://github.com/nushell/nushell/pull/14538)|
186
336
|[@Bahex](https://github.com/Bahex)|docs(reduce): add example demonstrating accumulator as pipeline input|[#14593](https://github.com/nushell/nushell/pull/14593)|
337
+
|[@Bahex](https://github.com/Bahex)|remove the deprecated index argument from filter commands' closure signature|[#14594](https://github.com/nushell/nushell/pull/14594)|
338
+
|[@Bahex](https://github.com/Bahex)|`std/iter scan`: change closure signature to be consistent with `reduce`|[#14596](https://github.com/nushell/nushell/pull/14596)|
187
339
188
-
<!-- |[@Bahex](https://github.com/Bahex)|remove the deprecated index argument from filter commands' closure signature|[#14594](https://github.com/nushell/nushell/pull/14594)| -->
189
340
<!-- |[@Beinsezii](https://github.com/Beinsezii)|command/http/client use CRLF for headers join instead of LF|[#14417](https://github.com/nushell/nushell/pull/14417)| -->
0 commit comments