Home Explore Blog CI



nushell

2nd chunk of `blog/2020-11-03-nushell_0_22.md`
44c881fa5f0c6452f17e42ec7d37577cacf6102622bf728d0000000100000234


_New flatten command_

There's now a flatten command that can take tables nested inside of the main table and flatten their contents into the main table.

### More `math` commands (morbatex, gillespiecd, fdncred)

You can now use rounding in math operations:

```
> echo [1.5 2.3 -3.1] | math ceil
───┬────
 0 │  2
 1 │  3
 2 │ -3
───┴────

> echo [1.5 2.3 -3.1] | math floor
───┬────
 0 │  1
 1 │  2
 2 │ -4
───┴────

Title: Nushell 0.22: Flatten Command and New Math Functions
Summary
The Nushell 0.22 release includes the addition of a `flatten` command, which can flatten nested tables into a single main table. Additionally, new math commands have been introduced, including `ceil` and `floor`, to enable rounding operations within math expressions. These commands are illustrated with examples showing how they operate on lists of numbers.