From 7ffee650975ff37cb5657e7e53efee65108d7bab Mon Sep 17 00:00:00 2001 From: Daniel Winther Petersen Date: Wed, 18 Dec 2024 10:41:14 +0100 Subject: [PATCH] Fixed some examples for Command Output in Nushell --- book/pipelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/pipelines.md b/book/pipelines.md index 2162de80383..5544b49579d 100644 --- a/book/pipelines.md +++ b/book/pipelines.md @@ -470,13 +470,13 @@ In fact, running this in the shell will only display `"What?!"` because that is Knowing when data is displayed is important when using configuration variables that affect the display output of commands such as `table`. ```nu -> do { $env.config.table.mode = none; ls } +> do { $env.config.table.mode = "none"; ls } ``` 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 ```nu -> do { $env.config.table.mode = none; ls } | table +> do { $env.config.table.mode = "none"; ls } | table ``` 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 When displaying data early is desired, it is possible to explicitly apply `| table` inside the scope, or use the `print` command. ```nu -> do { $env.config.table.mode = none; ls | table } -> do { $env.config.table.mode = none; print (ls) } +> do { $env.config.table.mode = "none"; ls | table } +> do { $env.config.table.mode = "none"; print (ls) } ```