From c1c73811d59496a27b79b822509071c57880d92d Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Wed, 6 Dec 2023 16:26:02 +0100 Subject: [PATCH] fix `nu-std` README (#11244) related to - https://github.com/nushell/nushell/issues/10676#issuecomment-1842472941 from @suimong # Description the command in the `README.md` of `nu-std` should use `scope commands` instead of `help commands`, which return an empty list. # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-std/README.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/nu-std/README.md b/crates/nu-std/README.md index a7c2d87c76..d6e4d6e9f6 100644 --- a/crates/nu-std/README.md +++ b/crates/nu-std/README.md @@ -9,19 +9,15 @@ provide interactive utilities and building blocks for users writing casual scrip To see what's here: ``` > use std -> help commands | select name usage | where name =~ "std " -╭────┬─────────────────────────────┬────────────────────────────────────────────────────────────────╮ -│ # │ name │ usage │ -├────┼─────────────────────────────┼────────────────────────────────────────────────────────────────┤ -│ 0 │ std assert │ Universal assert command │ -│ 1 │ std assert equal │ Assert $left == $right │ - . . . -│ 11 │ std clip │ put the end of a pipe into the system clipboard. │ -│ 12 │ std dirs add │ Add one or more directories to the list. │ - . . . -├────┼─────────────────────────────┼────────────────────────────────────────────────────────────────┤ -│ # │ name │ usage │ -╰────┴─────────────────────────────┴────────────────────────────────────────────────────────────────╯ +> scope commands | select name usage | where name =~ "std " +#┬───────────name────────────┬──────────────────────usage────────────────────── +0│std assert │Universal assert command +1│std assert equal │Assert $left == $right +2│std assert error │Assert that executing the code generates an error +3│std assert greater │Assert $left > $right +4│std assert greater or equal│Assert $left >= $right + ... ... +─┴───────────────────────────┴───────────────────────────────────────────────── ``` ## :toolbox: Using the standard library in the REPL or in scripts