Skip to content

Commit ec9fac2

Browse files
Fixed some examples for Command Output in Nushell (nushell#1683)
Co-authored-by: Daniel Winther Petersen <[email protected]>
1 parent 58df050 commit ec9fac2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

book/pipelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,13 @@ In fact, running this in the shell will only display `"What?!"` because that is
470470
Knowing when data is displayed is important when using configuration variables that affect the display output of commands such as `table`.
471471

472472
```nu
473-
> do { $env.config.table.mode = none; ls }
473+
> do { $env.config.table.mode = "none"; ls }
474474
```
475475

476476
For instance, the above example sets the `$env.config.table.mode` configuration variable to `none`, which causes the `table` command to render data without additional borders. However, as it was shown earlier, the command is effectively equivalent to
477477

478478
```nu
479-
> do { $env.config.table.mode = none; ls } | table
479+
> do { $env.config.table.mode = "none"; ls } | table
480480
```
481481

482482
Because Nushell `$env` variables are [scoped](https://www.nushell.sh/book/environment.html#scoping), this means that the `table` command in the example is not affected by the
@@ -485,6 +485,6 @@ environment modification inside the `do` block and the data will not be shown wi
485485
When displaying data early is desired, it is possible to explicitly apply `| table` inside the scope, or use the `print` command.
486486

487487
```nu
488-
> do { $env.config.table.mode = none; ls | table }
489-
> do { $env.config.table.mode = none; print (ls) }
488+
> do { $env.config.table.mode = "none"; ls | table }
489+
> do { $env.config.table.mode = "none"; print (ls) }
490490
```

0 commit comments

Comments
 (0)