Skip to content

Commit c53bbe6

Browse files
authored
Improve code blocks with common format and output (#2116)
* Use common prompt code format for unlet example code * Fix code example comment alignment * Add code example output
1 parent 46c20bc commit c53bbe6

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

blog/2026-01-17-nushell_v0_110_0.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ let files = ls | get name
8989
To bring balance to the universe, [#17270](https://github.com/nushell/nushell/pull/17270) introduces a new command `unlet` for deleting variables from memory.
9090

9191
```nu
92-
let a = 1;let b = 2;let c = 3;let d = 4
93-
$"($a)($b)($c)($d)"
94-
1234
95-
unlet $a $b $c $d
96-
$"($a)($b)($c)($d)"
97-
Error: nu::shell::variable_not_found
98-
99-
× Variable not found
100-
╭─[entry #21:1:4]
101-
1 │ $"($a)($b)($c)($d)"
102-
· ─┬
103-
· ╰── variable not found
104-
╰────
92+
let a = 1;let b = 2;let c = 3;let d = 4
93+
$"($a)($b)($c)($d)"
94+
# => 1234
95+
unlet $a $b $c $d
96+
$"($a)($b)($c)($d)"
97+
# => Error: nu::shell::variable_not_found
98+
# =>
99+
# => × Variable not found
100+
# => ╭─[entry #21:1:4]
101+
# => 1 │ $"($a)($b)($c)($d)"
102+
# => · ─┬
103+
# => · ╰── variable not found
104+
# => ╰────
105105
```
106106

107107
Accompanying this is a new `mem_size` column in the output of the `scope variables` command for showing the size of each variable in memory (implemented in [#17287](https://github.com/nushell/nushell/pull/17287)).
@@ -577,7 +577,7 @@ With [#17121](https://github.com/nushell/nushell/pull/17121), variables and envi
577577

578578
```nu
579579
$env.MY_VAR = "hello" # First call
580-
$env.MY_VAR # Second call returns "hello"
580+
$env.MY_VAR # Second call returns "hello"
581581
```
582582

583583
### Use structured response format for MCP server [[toc](#table-of-contents)]
@@ -608,6 +608,10 @@ Ranges that include a parenthesized expression will now be parsed correctly afte
608608

609609
```nu
610610
0..(1..2 | first)
611+
# => ╭───┬───╮
612+
# =>00
613+
# =>11
614+
# => ╰───┴───╯
611615
```
612616

613617
### Fixed parsing issue with multiarm match + guard [[toc](#table-of-contents)]
@@ -618,6 +622,7 @@ Match statements with multiple arms and a guard expression, such as the below ex
618622
match 3 {
619623
1 | 2 | 3 if true => 'test'
620624
}
625+
# => test
621626
```
622627

623628
### Infinite sequences can be terminated when piped to other commands [[toc](#table-of-contents)]

0 commit comments

Comments
 (0)