Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add a note about #8189 to the 0.77 release
  • Loading branch information
amtoine committed Apr 4, 2023
commit 79e57319357a298ba8eefe4eca227ef5949b8257
54 changes: 54 additions & 0 deletions blog/2023-03-14-nushell_0_77.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,60 @@ Signatures:
<nothing> | http -> <string>
```

## Examples results are now shown in `help` pages ([amtoine](https://github.com/nushell/nushell/pull/8189))

When commands define expected results for their examples, the output is now shown just below the associated examples.

Let's take the `merge` command as an example!

Before the change, the output of `help merge` would give

```bash
Examples:
Add an 'index' column to the input table
> [a b c] | wrap name | merge ( [1 2 3] | wrap index )

Merge two records
> {a: 1, b: 2} | merge {c: 3}

Merge two tables, overwriting overlapping columns
> [{columnA: A0 columnB: B0}] | merge [{columnA: 'A0*'}]
```

Now, it gives the output of all the example commands:

```bash
Examples:
Add an 'index' column to the input table
> [a b c] | wrap name | merge ( [1 2 3] | wrap index )
╭───┬──────╮
│ # │ name │
├───┼──────┤
│ 1 │ a │
│ 2 │ b │
│ 3 │ c │
╰───┴──────╯

Merge two records
> {a: 1, b: 2} | merge {c: 3}
╭───┬───╮
│ a │ 1 │
│ b │ 2 │
│ c │ 3 │
╰───┴───╯

Merge two tables, overwriting overlapping columns
> [{columnA: A0 columnB: B0}] | merge [{columnA: 'A0*'}]
╭───┬─────────┬─────────╮
│ # │ columnA │ columnB │
├───┼─────────┼─────────┤
│ 0 │ A0* │ B0 │
╰───┴─────────┴─────────╯
```

> :bulb: **Note**
> the website has been modified accordingly with the same outputs.

Make sure to browse the help messages of these commands. They contain fully functional examples thanks to pointing at www.example.com.

# Breaking changes
Expand Down