Skip to content

Commit

Permalink
Fix styling on 0.73 release notes (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
sholderbach committed Dec 27, 2022
1 parent ded5641 commit 529e0d4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions blog/2022-12-20-nushell-0.73.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ This release includes a new experimental command called `explore` for viewing Nu

`explore` is highly experimental and we expect it to change in the future. [Please report any issues you discover](https://github.com/nushell/nushell/issues/new/choose).

### New `math` commands ([sholderbach](https://github.com/nushell/nushell/pull/7258))
## New `math` commands ([sholderbach](https://github.com/nushell/nushell/pull/7258))

With this release we include a larger number of `math` commands for real valued math such as trigonometric functions and logarithms.
The goal is to remove the `math eval` command that operates on strings instead of proper nushell expressions.

#### Constants
### Constants

- `math pi`
- `math tau`
- `math e`

#### Trigonometry and hyperbolic functions
### Trigonometry and hyperbolic functions

- `math sin`
- `math cos`
Expand All @@ -65,31 +65,31 @@ The goal is to remove the `math eval` command that operates on strings instead o
- `math arccosh`
- `math arctanh`

#### Logarithms
### Logarithms

- `math log`
- `math ln`

```sh
> math pi | math cos
math pi | math cos
-1
> math e | math ln
math e | math ln
1
> [16 8 4 2] | math log 2
[16 8 4 2] | math log 2
[4 3 2 1]
```

## Changes to commands with predicates ([kubouch](https://github.com/nushell/nushell/pull/7428))

`any`, `all`, `skip until`, `skip while`, `take until`, and `take while` now accept a closure instead of a row condition. For example

```
```sh
[[status]; [UP] [UP]] | all status == UP
```

becomes

```
```sh
[[status]; [UP] [UP]] | all {|el| $el.status == UP }
```

Expand All @@ -99,19 +99,19 @@ This makes them slightly more verbose but it is a part of an effort to refactor

We found the `-b` flag of `where` quite confusing and decided to remove it in favor of a new `filter` command. Both `filter` and `where` have similar functionality but `where` now only accepts a row condition and `filter` accepts a closure. Before:

```
```sh
[{a: 1} {a: 2}] | where -b {|x| $x.a > 1}
```

After:

```
```sh
[{a: 1} {a: 2}] | filter {|x| $x.a > 1}
```

Why is it useful to have two commands doing the same thing? Because with the `filter` command, you can store the closure in a variable:

```
```sh
let cond = {|x| $x.a > 1}
[{a: 1} {a: 2}] | filter $cond
```
Expand All @@ -123,7 +123,7 @@ On the other hand, `where` is more concise (`[{a: 1} {a: 2}] | where a > 1`) but
To complement `uniq` which can identify unique or duplicated values in a collection or report the number of occurrences for a particular entry, we now have `uniq-by`.
It supports filtering a table by entries appearing in a particular column.

```
```sh
〉 [[fruit day]; [apple monday] [apple friday] [Apple friday] [apple monday] [pear monday] [orange tuesday]] | uniq-by fruit
╭───┬────────┬─────────╮
# │ fruit │ day │
Expand All @@ -139,7 +139,7 @@ It supports filtering a table by entries appearing in a particular column.

If a variable has been defined as mutable using the recently-added `mut` keyword, you can now deeply mutate its inner values using `=`.

```
```sh
〉 mut a = { b: 1 }
$a.b = 2
$a.c = 3
Expand All @@ -149,7 +149,7 @@ If a variable has been defined as mutable using the recently-added `mut` keyword
This syntax enhancement was added primarily to make modifying `$env.config` during a normal session much easier. Now, `$env.config` is considered inherently mutable. You can change a single config value like so:
```
```sh
$env.config.table.mode = compact_double
```
Expand All @@ -161,7 +161,7 @@ The `color_config` config record has new functionality: instead of specifying a
Here are some examples.
```
```sh
filesize: {|e|
if $e == 0b { 'dark_gray'
} else if $e < 1mb { 'cyan_bold'
Expand All @@ -171,7 +171,7 @@ filesize: {|e|
This causes all filesize values to be colored using `dark_gray` if they equal `0b`, `cyan_bold` if they are less than `1mb`, and `blue_bold` otherwise. This means that, in `ls` output, empty files can be more easily distinguished from non-empty ones.
```
```sh
bool: { if $in { 'light_cyan' } else { 'light_gray' } }
```
Expand All @@ -195,12 +195,12 @@ Starting with 0.73, Nushell now provides a RISC V for Linux as part of the set o
- `split row` command will retain an empty string if splitted string is empty. ([#7413](https://github.com/nushell/nushell/pull/7413))
- `split list` now properly removes the separator in all positions ([#7355](https://github.com/nushell/nushell/pull/7355))
- [The `--show-created-paths` flag has been replaced by `--verbose` from `mkdir`](https://github.com/nushell/nushell/pull/7462).
- `fetch` removes `--output`, `--bin`, `--append` flags, use `fetch` with `save` to save fetched page to a file. ([#7468](https://github.com/nushell/nushell/pull/7468))
- `fetch`: the `--output`, `--bin`, `--append` flags have been removed, use `fetch` with `save` to save fetched page to a file. ([#7468](https://github.com/nushell/nushell/pull/7468))
- changes to how `get` works with deep cell paths ([#7480](https://github.com/nushell/nushell/pull/7497))
- `mkdir`'s `-s`/`--show-created-paths` has been renamed to `-v`/`--verbose` for better consistency ([#7462](https://github.com/nushell/nushell/pull/7462))
- `&&` is now `and` and `||` is now `or`
- `any`, `all`, `skip until`, `skip while`, `take until`, `take while` now take only a closure as an argument.
- `where` now takes only row condition argument, `-b` flag removed.
- `where` now takes only row condition argument, the `-b` flag has been removed (use `filter` instead of `where -b`).
# Full changelog
Expand Down

0 comments on commit 529e0d4

Please sign in to comment.