diff --git a/lang-guide/chapters/strings_and_text.md b/lang-guide/chapters/strings_and_text.md index 67e34303269..b33c3e9fe1a 100644 --- a/lang-guide/chapters/strings_and_text.md +++ b/lang-guide/chapters/strings_and_text.md @@ -118,8 +118,8 @@ Sometimes you need to nest quotes. I think this could use some work because some The key to always remember is that double quotes recognize and interpret escapes so if you have any `\` characters in your string, they will be interpreted as escapes. The following is an example of a question we get frequently on Discord. ```nu -Why doesn't this work? -> cd "C:\Program Files\somedir" +# Why doesn't this work? +cd "C:\Program Files\somedir" ``` It doesn't work because it sees `\P` and `\s` as escapes that are not recognized. diff --git a/lang-guide/chapters/types/basic_types/table.md b/lang-guide/chapters/types/basic_types/table.md index fcd7c23b086..66fdf738b87 100644 --- a/lang-guide/chapters/types/basic_types/table.md +++ b/lang-guide/chapters/types/basic_types/table.md @@ -17,13 +17,13 @@ Table literals can be created using a syntax similar to that of a list literal. Because tables also contain columns and not just values, we also specify the column names: ```nu -> [[column1, column2]; [Value1, Value2] [Value3, Value4]] -╭───┬─────────┬─────────╮ -│ # │ column1 │ column2 │ -├───┼─────────┼─────────┤ -│ 0 │ Value1 │ Value2 │ -│ 1 │ Value3 │ Value4 │ -╰───┴─────────┴─────────╯ +[[column1, column2]; [Value1, Value2] [Value3, Value4]] +# => ╭───┬─────────┬─────────╮ +# => │ # │ column1 │ column2 │ +# => ├───┼─────────┼─────────┤ +# => │ 0 │ Value1 │ Value2 │ +# => │ 1 │ Value3 │ Value4 │ +# => ╰───┴─────────┴─────────╯ ``` In this syntax, the headers are separated from the data cells using a semicolon(`;`). The semicolon separator is mandatory in a table-literal. It must follow the headers. @@ -33,13 +33,13 @@ In this syntax, the headers are separated from the data cells using a semicolon( You can also create a table as a list of records, JSON-style: ```nu -> [{name: "Sam", rank: 10}, {name: "Bob", rank: 7}] -╭───┬──────┬──────╮ -│ # │ name │ rank │ -├───┼──────┼──────┤ -│ 0 │ Sam │ 10 │ -│ 1 │ Bob │ 7 │ -╰───┴──────┴──────╯ +[{name: "Sam", rank: 10}, {name: "Bob", rank: 7}] +# => ╭───┬──────┬──────╮ +# => │ # │ name │ rank │ +# => ├───┼──────┼──────┤ +# => │ 0 │ Sam │ 10 │ +# => │ 1 │ Bob │ 7 │ +# => ╰───┴──────┴──────╯ ``` This list-of-records pattern plays on the Nushell data model, which sees a list of records as equivalent to a table. This is useful in cases where the length of a table may not be known ahead of time. In such a case, a stream of records likewise represents a table. diff --git a/snippets/book/moving_around/cd_example.nu b/snippets/book/moving_around/cd_example.nu index 4d04a880421..2ccd4e78602 100644 --- a/snippets/book/moving_around/cd_example.nu +++ b/snippets/book/moving_around/cd_example.nu @@ -1 +1 @@ -> cd new_directory +cd new_directory diff --git a/snippets/book/moving_around/cd_without_command_example.nu b/snippets/book/moving_around/cd_without_command_example.nu index da7cdedca3d..72772b9e7ab 100644 --- a/snippets/book/moving_around/cd_without_command_example.nu +++ b/snippets/book/moving_around/cd_without_command_example.nu @@ -1 +1 @@ -> ./new_directory +./new_directory diff --git a/snippets/book/moving_around/multiple_cd_levels.nu b/snippets/book/moving_around/multiple_cd_levels.nu index 363af222d18..1be91f3a045 100644 --- a/snippets/book/moving_around/multiple_cd_levels.nu +++ b/snippets/book/moving_around/multiple_cd_levels.nu @@ -1,11 +1,11 @@ # Change to the parent directory -> cd .. +cd .. # or -> .. +.. # Go up two levels (parent's parent) -> cd ... +cd ... # or -> ... +... # Go up three levels (parent of parent's parent) -> cd .... -# Etc. \ No newline at end of file +cd .... +# Etc. diff --git a/snippets/book/moving_around/relative_cd_levels.nu b/snippets/book/moving_around/relative_cd_levels.nu index 86929fea338..4d4ee4a4164 100644 --- a/snippets/book/moving_around/relative_cd_levels.nu +++ b/snippets/book/moving_around/relative_cd_levels.nu @@ -1 +1 @@ -> cd ../sibling \ No newline at end of file +cd ../sibling diff --git a/snippets/installation/build_nu_from_source.sh b/snippets/installation/build_nu_from_source.sh index 6dc0a2085e3..3fdda9ce621 100644 --- a/snippets/installation/build_nu_from_source.sh +++ b/snippets/installation/build_nu_from_source.sh @@ -1,2 +1,3 @@ -> cd nushell -nushell> cargo build --workspace; cargo run +cd nushell +# ./nushell +cargo build --workspace; cargo run diff --git a/snippets/installation/build_nu_from_source_release.sh b/snippets/installation/build_nu_from_source_release.sh index d8ad6ee3fb9..62f6b145695 100644 --- a/snippets/installation/build_nu_from_source_release.sh +++ b/snippets/installation/build_nu_from_source_release.sh @@ -1 +1 @@ -nushell> cargo build --release --workspace; cargo run --release +cargo build --release --workspace; cargo run --release diff --git a/snippets/installation/build_nu_yourself.sh b/snippets/installation/build_nu_yourself.sh index 5c2af2a386a..34f8733dfcc 100644 --- a/snippets/installation/build_nu_yourself.sh +++ b/snippets/installation/build_nu_yourself.sh @@ -1,3 +1,4 @@ -> git clone https://github.com/nushell/nushell.git -> cd nushell -nushell> cargo install --path . --locked +git clone https://github.com/nushell/nushell.git +cd nushell +# ./nushell +cargo install --path . --locked diff --git a/snippets/installation/cargo_install_nu.sh b/snippets/installation/cargo_install_nu.sh index 416dc5b0230..6bf58bf91dd 100644 --- a/snippets/installation/cargo_install_nu.sh +++ b/snippets/installation/cargo_install_nu.sh @@ -1 +1 @@ -> cargo install nu --locked +cargo install nu --locked diff --git a/snippets/installation/git_clone_nu.sh b/snippets/installation/git_clone_nu.sh index 15df321e51f..c3351c356ce 100644 --- a/snippets/installation/git_clone_nu.sh +++ b/snippets/installation/git_clone_nu.sh @@ -1 +1 @@ -> git clone https://github.com/nushell/nushell.git +git clone https://github.com/nushell/nushell.git diff --git a/snippets/installation/windows_run_nu.sh b/snippets/installation/windows_run_nu.sh index 76a9a25eb34..f5f171aac7b 100644 --- a/snippets/installation/windows_run_nu.sh +++ b/snippets/installation/windows_run_nu.sh @@ -1,2 +1 @@ -> nu -C:\Users\user> \ No newline at end of file +nu diff --git a/snippets/introduction/date_example.sh b/snippets/introduction/date_example.sh index c805a1824d6..3b921b8cd6a 100644 --- a/snippets/introduction/date_example.sh +++ b/snippets/introduction/date_example.sh @@ -1,2 +1,2 @@ -> date now -2022-03-07 14:14:51.684619600 -08:00 +date now +# => 2022-03-07 14:14:51.684619600 -08:00 diff --git a/snippets/introduction/date_table_example.sh b/snippets/introduction/date_table_example.sh index fe53da36f4b..72188c4d510 100644 --- a/snippets/introduction/date_table_example.sh +++ b/snippets/introduction/date_table_example.sh @@ -1,6 +1,6 @@ -> date now | date to-table -╭───┬──────┬───────┬─────┬──────┬────────┬────────┬──────────╮ -│ # │ year │ month │ day │ hour │ minute │ second │ timezone │ -├───┼──────┼───────┼─────┼──────┼────────┼────────┼──────────┤ -│ 0 │ 2022 │ 3 │ 7 │ 14 │ 45 │ 3 │ -08:00 │ -╰───┴──────┴───────┴─────┴──────┴────────┴────────┴──────────╯ +date now | date to-table +# => ╭───┬──────┬───────┬─────┬──────┬────────┬────────┬──────────╮ +# => │ # │ year │ month │ day │ hour │ minute │ second │ timezone │ +# => ├───┼──────┼───────┼─────┼──────┼────────┼────────┼──────────┤ +# => │ 0 │ 2022 │ 3 │ 7 │ 14 │ 45 │ 3 │ -08:00 │ +# => ╰───┴──────┴───────┴─────┴──────┴────────┴────────┴──────────╯ diff --git a/snippets/introduction/help_commands_each_example.nu b/snippets/introduction/help_commands_each_example.nu index 95432e31c88..f596c795177 100644 --- a/snippets/introduction/help_commands_each_example.nu +++ b/snippets/introduction/help_commands_each_example.nu @@ -1,22 +1,22 @@ -> help commands | where name == each | first -╭──────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ name │ each │ -│ category │ filters │ -│ command_type │ built-in │ -│ usage │ Run a closure on each row of the input list, creating a new list with the results. │ -│ │ ╭───┬──────────────────┬──────────────┬──────────┬───────────────────────────────────────────╮ │ -│ params │ │ # │ name │ type │ required │ description │ │ -│ │ ├───┼──────────────────┼──────────────┼──────────┼───────────────────────────────────────────┤ │ -│ │ │ 0 │ closure │ closure(any) │ true │ The closure to run. │ │ -│ │ │ 1 │ --help(-h) │ switch │ false │ Display the help message for this command │ │ -│ │ │ 2 │ --keep-empty(-k) │ switch │ false │ keep empty result cells │ │ -│ │ ╰───┴──────────────────┴──────────────┴──────────┴───────────────────────────────────────────╯ │ -│ │ ╭───┬───────────┬───────────╮ │ -│ input_output │ │ # │ input │ output │ │ -│ │ ├───┼───────────┼───────────┤ │ -│ │ │ 0 │ list │ list │ │ -│ │ │ 1 │ table │ list │ │ -│ │ │ 2 │ any │ any │ │ -│ │ ╰───┴───────────┴───────────╯ │ -│ search_terms │ for, loop, iterate, map │ -╰──────────────┴────────────────────────────────────────────────────────────────────────────────────────────────╯ +> commands | where name == each | first +# => ╭──────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮ +# => │ name │ each │ +# => │ category │ filters │ +# => │ command_type │ built-in │ +# => │ usage │ Run a closure on each row of the input list, creating a new list with the results. │ +# => │ │ ╭───┬──────────────────┬──────────────┬──────────┬───────────────────────────────────────────╮ │ +# => │ params │ │ # │ name │ type │ required │ description │ │ +# => │ │ ├───┼──────────────────┼──────────────┼──────────┼───────────────────────────────────────────┤ │ +# => │ │ │ 0 │ closure │ closure(any) │ true │ The closure to run. │ │ +# => │ │ │ 1 │ --help(-h) │ switch │ false │ Display the help message for this command │ │ +# => │ │ │ 2 │ --keep-empty(-k) │ switch │ false │ keep empty result cells │ │ +# => │ │ ╰───┴──────────────────┴──────────────┴──────────┴───────────────────────────────────────────╯ │ +# => │ │ ╭───┬───────────┬───────────╮ │ +# => │ input_output │ │ # │ input │ output │ │ +# => │ │ ├───┼───────────┼───────────┤ │ +# => │ │ │ 0 │ list │ list │ │ +# => │ │ │ 1 │ table │ list │ │ +# => │ │ │ 2 │ any │ any │ │ +# => │ │ ╰───┴───────────┴───────────╯ │ +# => │ search_terms │ for, loop, iterate, map │ +# => ╰──────────────┴────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/snippets/introduction/help_commands_get_cell_path_example.nu b/snippets/introduction/help_commands_get_cell_path_example.nu index 4778c8a899c..2ed4c040032 100644 --- a/snippets/introduction/help_commands_get_cell_path_example.nu +++ b/snippets/introduction/help_commands_get_cell_path_example.nu @@ -1,6 +1,6 @@ -> help commands | where name == each | get 0.params.name -╭───┬──────────────────╮ -│ 0 │ closure │ -│ 1 │ --help(-h) │ -│ 2 │ --keep-empty(-k) │ -╰───┴──────────────────╯ +help commands | where name == each | get 0.params.name +# => ╭───┬──────────────────╮ +# => │ 0 │ closure │ +# => │ 1 │ --help(-h) │ +# => │ 2 │ --keep-empty(-k) │ +# => ╰───┴──────────────────╯ diff --git a/snippets/introduction/help_commands_get_example.nu b/snippets/introduction/help_commands_get_example.nu index f5b201b4c91..53996de51ed 100644 --- a/snippets/introduction/help_commands_get_example.nu +++ b/snippets/introduction/help_commands_get_example.nu @@ -1,8 +1,8 @@ -> help commands | where name == each | first | get params -╭───┬──────────────────┬──────────────┬──────────┬───────────────────────────────────────────╮ -│ # │ name │ type │ required │ description │ -├───┼──────────────────┼──────────────┼──────────┼───────────────────────────────────────────┤ -│ 0 │ closure │ closure(any) │ true │ The closure to run. │ -│ 1 │ --help(-h) │ switch │ false │ Display the help message for this command │ -│ 2 │ --keep-empty(-k) │ switch │ false │ keep empty result cells │ -╰───┴──────────────────┴──────────────┴──────────┴───────────────────────────────────────────╯ +help commands | where name == each | first | get params +# => ╭───┬──────────────────┬──────────────┬──────────┬───────────────────────────────────────────╮ +# => │ # │ name │ type │ required │ description │ +# => ├───┼──────────────────┼──────────────┼──────────┼───────────────────────────────────────────┤ +# => │ 0 │ closure │ closure(any) │ true │ The closure to run. │ +# => │ 1 │ --help(-h) │ switch │ false │ Display the help message for this command │ +# => │ 2 │ --keep-empty(-k) │ switch │ false │ keep empty result cells │ +# => ╰───┴──────────────────┴──────────────┴──────────┴───────────────────────────────────────────╯ diff --git a/snippets/introduction/help_commands_get_nested_example.nu b/snippets/introduction/help_commands_get_nested_example.nu index 5d6b3d3f77e..8a3f5da56b5 100644 --- a/snippets/introduction/help_commands_get_nested_example.nu +++ b/snippets/introduction/help_commands_get_nested_example.nu @@ -1,6 +1,6 @@ -> help commands | where name == each | first | get params.name -╭───┬──────────────────╮ -│ 0 │ closure │ -│ 1 │ --help(-h) │ -│ 2 │ --keep-empty(-k) │ -╰───┴──────────────────╯ +help commands | where name == each | first | get params.name +# => ╭───┬──────────────────╮ +# => │ 0 │ closure │ +# => │ 1 │ --help(-h) │ +# => │ 2 │ --keep-empty(-k) │ +# => ╰───┴──────────────────╯ diff --git a/snippets/introduction/help_example.sh b/snippets/introduction/help_example.sh index d7984f5139d..ad598f53f80 100644 --- a/snippets/introduction/help_example.sh +++ b/snippets/introduction/help_example.sh @@ -1,33 +1,33 @@ -> help path -Explore and manipulate paths. - -There are three ways to represent a path: - -* As a path literal, e.g., '/home/viking/spam.txt' -* As a structured path: a table with 'parent', 'stem', and 'extension' (and -* 'prefix' on Windows) columns. This format is produced by the 'path parse' - subcommand. -* As an inner list of path parts, e.g., '[[ / home viking spam.txt ]]'. - Splitting into parts is done by the `path split` command. - -All subcommands accept all three variants as an input. Furthermore, the 'path -join' subcommand can be used to join the structured path or path parts back into -the path literal. - -Usage: - > path - -Subcommands: - path basename - Get the final component of a path - path dirname - Get the parent directory of a path - path exists - Check whether a path exists - path expand - Try to expand a path to its absolute form - path join - Join a structured path or a list of path parts. - path parse - Convert a path into structured data. - path relative-to - Get a path as relative to another path. - path split - Split a path into parts by a separator. - path type - Get the type of the object a path refers to (e.g., file, dir, symlink) - -Flags: - -h, --help - Display this help message +help path +# => Explore and manipulate paths. +# => +# => There are three ways to represent a path: +# => +# => * As a path literal, e.g., '/home/viking/spam.txt' +# => * As a structured path: a table with 'parent', 'stem', and 'extension' (and +# => * 'prefix' on Windows) columns. This format is produced by the 'path parse' +# => subcommand. +# => * As an inner list of path parts, e.g., '[[ / home viking spam.txt ]]'. +# => Splitting into parts is done by the `path split` command. +# => +# => All subcommands accept all three variants as an input. Furthermore, the 'path +# => join' subcommand can be used to join the structured path or path parts back into +# => the path literal. +# => +# => Usage: +# => > path +# => +# => Subcommands: +# => path basename - Get the final component of a path +# => path dirname - Get the parent directory of a path +# => path exists - Check whether a path exists +# => path expand - Try to expand a path to its absolute form +# => path join - Join a structured path or a list of path parts. +# => path parse - Convert a path into structured data. +# => path relative-to - Get a path as relative to another path. +# => path split - Split a path into parts by a separator. +# => path type - Get the type of the object a path refers to (e.g., file, dir, symlink) +# => +# => Flags: +# => -h, --help +# => Display this help message diff --git a/snippets/introduction/ls_example.sh b/snippets/introduction/ls_example.sh index d01219974e0..41d3cdbf08b 100644 --- a/snippets/introduction/ls_example.sh +++ b/snippets/introduction/ls_example.sh @@ -1,11 +1,11 @@ -> ls -╭────┬───────────────────────┬──────┬───────────┬─────────────╮ -│ # │ name │ type │ size │ modified │ -├────┼───────────────────────┼──────┼───────────┼─────────────┤ -│ 0 │ 404.html │ file │ 429 B │ 3 days ago │ -│ 1 │ CONTRIBUTING.md │ file │ 955 B │ 8 mins ago │ -│ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ -│ 3 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ -│ 4 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 5 │ README.md │ file │ 213 B │ 3 days ago │ -... +ls +# => ╭────┬───────────────────────┬──────┬───────────┬─────────────╮ +# => │ # │ name │ type │ size │ modified │ +# => ├────┼───────────────────────┼──────┼───────────┼─────────────┤ +# => │ 0 │ 404.html │ file │ 429 B │ 3 days ago │ +# => │ 1 │ CONTRIBUTING.md │ file │ 955 B │ 8 mins ago │ +# => │ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +# => │ 3 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +# => │ 4 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +# => │ 5 │ README.md │ file │ 213 B │ 3 days ago │ +# => ... diff --git a/snippets/introduction/ls_sort_by_reverse_example.sh b/snippets/introduction/ls_sort_by_reverse_example.sh index ff02f26830f..077737c2ed1 100644 --- a/snippets/introduction/ls_sort_by_reverse_example.sh +++ b/snippets/introduction/ls_sort_by_reverse_example.sh @@ -1,11 +1,11 @@ -> ls | sort-by size | reverse -╭────┬───────────────────────┬──────┬───────────┬─────────────╮ -│ # │ name │ type │ size │ modified │ -├────┼───────────────────────┼──────┼───────────┼─────────────┤ -│ 0 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ -│ 1 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ -│ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ -│ 3 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 4 │ CONTRIBUTING.md │ file │ 955 B │ 9 mins ago │ -│ 5 │ books.md │ file │ 687 B │ 3 days ago │ -... +ls | sort-by size | reverse +# => ╭────┬───────────────────────┬──────┬───────────┬─────────────╮ +# => │ # │ name │ type │ size │ modified │ +# => ├────┼───────────────────────┼──────┼───────────┼─────────────┤ +# => │ 0 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +# => │ 1 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +# => │ 2 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +# => │ 3 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +# => │ 4 │ CONTRIBUTING.md │ file │ 955 B │ 9 mins ago │ +# => │ 5 │ books.md │ file │ 687 B │ 3 days ago │ +# => ... diff --git a/snippets/introduction/ls_where_example.sh b/snippets/introduction/ls_where_example.sh index 3330c1bb46b..d290b0dddba 100644 --- a/snippets/introduction/ls_where_example.sh +++ b/snippets/introduction/ls_where_example.sh @@ -1,9 +1,9 @@ -> ls | where size > 1kb -╭───┬───────────────────┬──────┬─────────┬────────────╮ -│ # │ name │ type │ size │ modified │ -├───┼───────────────────┼──────┼─────────┼────────────┤ -│ 0 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ -│ 1 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ -│ 2 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ -│ 3 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ -╰───┴───────────────────┴──────┴─────────┴────────────╯ +ls | where size > 1kb +# => ╭───┬───────────────────┬──────┬─────────┬────────────╮ +# => │ # │ name │ type │ size │ modified │ +# => ├───┼───────────────────┼──────┼─────────┼────────────┤ +# => │ 0 │ Gemfile │ file │ 1.1 KiB │ 3 days ago │ +# => │ 1 │ Gemfile.lock │ file │ 6.9 KiB │ 3 days ago │ +# => │ 2 │ LICENSE │ file │ 1.1 KiB │ 3 days ago │ +# => │ 3 │ SUMMARY.md │ file │ 3.7 KiB │ 3 days ago │ +# => ╰───┴───────────────────┴──────┴─────────┴────────────╯ diff --git a/snippets/introduction/ps_example.sh b/snippets/introduction/ps_example.sh index f8513120c11..1ef5292e05e 100644 --- a/snippets/introduction/ps_example.sh +++ b/snippets/introduction/ps_example.sh @@ -1,9 +1,9 @@ -> ps -╭─────┬───────┬───────┬──────────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ -│ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ -├─────┼───────┼───────┼──────────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ -│ 0 │ 87194 │ 1 │ mdworker_shared │ Sleep │ 0.00 │ 25.9 MB │ 418.0 GB │ -│ 1 │ 87183 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.00 │ 59.9 MB │ 1.6 TB │ -│ 2 │ 87182 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.23 │ 224.3 MB │ 1.6 TB │ -│ 3 │ 87156 │ 87105 │ Code Helper (Plugin) │ Sleep │ 0.00 │ 56.0 MB │ 457.4 GB │ -... +ps +# => ╭─────┬───────┬───────┬──────────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ +# => │ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ +# => ├─────┼───────┼───────┼──────────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ +# => │ 0 │ 87194 │ 1 │ mdworker_shared │ Sleep │ 0.00 │ 25.9 MB │ 418.0 GB │ +# => │ 1 │ 87183 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.00 │ 59.9 MB │ 1.6 TB │ +# => │ 2 │ 87182 │ 2314 │ Arc Helper (Renderer) │ Sleep │ 0.23 │ 224.3 MB │ 1.6 TB │ +# => │ 3 │ 87156 │ 87105 │ Code Helper (Plugin) │ Sleep │ 0.00 │ 56.0 MB │ 457.4 GB │ +# => ... diff --git a/snippets/introduction/ps_where_example.sh b/snippets/introduction/ps_where_example.sh index 17bb022308c..c37bd3ce39c 100644 --- a/snippets/introduction/ps_where_example.sh +++ b/snippets/introduction/ps_where_example.sh @@ -1,10 +1,10 @@ -> ps | where cpu > 5 -╭───┬───────┬───────┬─────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ -│ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ -├───┼───────┼───────┼─────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ -│ 0 │ 86759 │ 86275 │ nu │ Running │ 6.27 │ 38.7 MB │ 419.7 GB │ -│ 1 │ 89134 │ 1 │ com.apple.Virtualization.VirtualMachine │ Running │ 23.92 │ 1.5 GB │ 427.3 GB │ -│ 2 │ 70414 │ 1 │ VTDecoderXPCService │ Sleep │ 19.04 │ 17.5 MB │ 419.7 GB │ -│ 3 │ 2334 │ 1 │ TrackpadExtension │ Sleep │ 7.47 │ 25.3 MB │ 418.8 GB │ -│ 4 │ 1205 │ 1 │ iTerm2 │ Sleep │ 11.92 │ 657.2 MB │ 421.7 GB │ -╰───┴───────┴───────┴─────────────────────────────────────────┴─────────┴───────┴──────────┴──────────╯ +ps | where cpu > 5 +# => ╭───┬───────┬───────┬─────────────────────────────────────────┬─────────┬───────┬──────────┬──────────╮ +# => │ # │ pid │ ppid │ name │ status │ cpu │ mem │ virtual │ +# => ├───┼───────┼───────┼─────────────────────────────────────────┼─────────┼───────┼──────────┼──────────┤ +# => │ 0 │ 86759 │ 86275 │ nu │ Running │ 6.27 │ 38.7 MB │ 419.7 GB │ +# => │ 1 │ 89134 │ 1 │ com.apple.Virtualization.VirtualMachine │ Running │ 23.92 │ 1.5 GB │ 427.3 GB │ +# => │ 2 │ 70414 │ 1 │ VTDecoderXPCService │ Sleep │ 19.04 │ 17.5 MB │ 419.7 GB │ +# => │ 3 │ 2334 │ 1 │ TrackpadExtension │ Sleep │ 7.47 │ 25.3 MB │ 418.8 GB │ +# => │ 4 │ 1205 │ 1 │ iTerm2 │ Sleep │ 11.92 │ 657.2 MB │ 421.7 GB │ +# => ╰───┴───────┴───────┴─────────────────────────────────────────┴─────────┴───────┴──────────┴──────────╯ diff --git a/snippets/introduction/sys_example.sh b/snippets/introduction/sys_example.sh index 912622a707d..ae97be27c03 100644 --- a/snippets/introduction/sys_example.sh +++ b/snippets/introduction/sys_example.sh @@ -1,9 +1,9 @@ -> sys -╭───────┬───────────────────╮ -│ host │ {record 6 fields} │ -│ cpu │ [table 4 rows] │ -│ disks │ [table 3 rows] │ -│ mem │ {record 4 fields} │ -│ temp │ [table 1 row] │ -│ net │ [table 4 rows] │ -╰───────┴───────────────────╯ +sys +# => ╭───────┬───────────────────╮ +# => │ host │ {record 6 fields} │ +# => │ cpu │ [table 4 rows] │ +# => │ disks │ [table 3 rows] │ +# => │ mem │ {record 4 fields} │ +# => │ temp │ [table 1 row] │ +# => │ net │ [table 4 rows] │ +# => ╰───────┴───────────────────╯ diff --git a/snippets/introduction/sys_get_example.sh b/snippets/introduction/sys_get_example.sh index ac6ac52cd81..d1ef817d3b4 100644 --- a/snippets/introduction/sys_get_example.sh +++ b/snippets/introduction/sys_get_example.sh @@ -1,9 +1,9 @@ -> sys | get host -╭────────────────┬────────────────────────╮ -│ name │ Debian GNU/Linux │ -│ os version │ 11 │ -│ kernel version │ 5.10.92-v8+ │ -│ hostname │ lifeless │ -│ uptime │ 19day 21hr 34min 45sec │ -│ sessions │ [table 1 row] │ -╰────────────────┴────────────────────────╯ +sys | get host +# => ╭────────────────┬────────────────────────╮ +# => │ name │ Debian GNU/Linux │ +# => │ os version │ 11 │ +# => │ kernel version │ 5.10.92-v8+ │ +# => │ hostname │ lifeless │ +# => │ uptime │ 19day 21hr 34min 45sec │ +# => │ sessions │ [table 1 row] │ +# => ╰────────────────┴────────────────────────╯ diff --git a/snippets/introduction/sys_get_external_echo_example.sh b/snippets/introduction/sys_get_external_echo_example.sh index 8f8da41e4a3..e8176cba7da 100644 --- a/snippets/introduction/sys_get_external_echo_example.sh +++ b/snippets/introduction/sys_get_external_echo_example.sh @@ -1,2 +1,2 @@ -> sys | get host.sessions.name | each { |elt| ^echo $elt } -sophiajt +sys | get host.sessions.name | each { |elt| ^echo $elt } +# => sophiajt diff --git a/snippets/introduction/sys_get_nested_example.sh b/snippets/introduction/sys_get_nested_example.sh index cc2d709637a..52e9e893356 100644 --- a/snippets/introduction/sys_get_nested_example.sh +++ b/snippets/introduction/sys_get_nested_example.sh @@ -1,4 +1,4 @@ -> sys | get host.sessions.name -╭───┬──────────╮ -│ 0 │ sophiajt │ -╰───┴──────────╯ +sys | get host.sessions.name +# => ╭───┬──────────╮ +# => │ 0 │ sophiajt │ +# => ╰───┴──────────╯ diff --git a/snippets/loading_data/cargo-toml.sh b/snippets/loading_data/cargo-toml.sh index 30b45217393..d26ef427ace 100644 --- a/snippets/loading_data/cargo-toml.sh +++ b/snippets/loading_data/cargo-toml.sh @@ -1,5 +1,5 @@ -> open Cargo.lock | from toml -──────────┬─────────────────── - metadata │ [row 107 columns] - package │ [table 130 rows] -──────────┴─────────────────── +open Cargo.lock | from toml +# => ──────────┬─────────────────── +# => metadata │ [row 107 columns] +# => package │ [table 130 rows] +# => ──────────┴─────────────────── diff --git a/snippets/loading_data/rust-lang-feed.sh b/snippets/loading_data/rust-lang-feed.sh index f362047c313..8126e143a19 100644 --- a/snippets/loading_data/rust-lang-feed.sh +++ b/snippets/loading_data/rust-lang-feed.sh @@ -1,6 +1,6 @@ -> http get https://blog.rust-lang.org/feed.xml -╭────────────┬──────────────────╮ -│ tag │ feed │ -│ attributes │ {record 1 field} │ -│ content │ [table 18 rows] │ -╰────────────┴──────────────────╯ +http get https://blog.rust-lang.org/feed.xml +# => ╭────────────┬──────────────────╮ +# => │ tag │ feed │ +# => │ attributes │ {record 1 field} │ +# => │ content │ [table 18 rows] │ +# => ╰────────────┴──────────────────╯ diff --git a/snippets/loading_data/vscode.sh b/snippets/loading_data/vscode.sh index eff7ef0fb3a..be7ba62a29d 100644 --- a/snippets/loading_data/vscode.sh +++ b/snippets/loading_data/vscode.sh @@ -1,18 +1,18 @@ -> open editors/vscode/package.json -──────────────────┬─────────────────────────────────────────────────────────────────────────────── - name │ lark - description │ Lark support for VS Code - author │ Lark developers - license │ MIT - version │ 1.0.0 - repository │ [row type url] - publisher │ vscode - categories │ [table 0 rows] - keywords │ [table 1 rows] - engines │ [row vscode] - activationEvents │ [table 1 rows] - main │ ./out/extension - contributes │ [row configuration grammars languages] - scripts │ [row compile postinstall test vscode:prepublish watch] - devDependencies │ [row @types/mocha @types/node tslint typescript vscode vscode-languageclient] -──────────────────┴─────────────────────────────────────────────────────────────────────────────── +open editors/vscode/package.json +# => ──────────────────┬─────────────────────────────────────────────────────────────────────────────── +# => name │ lark +# => description │ Lark support for VS Code +# => author │ Lark developers +# => license │ MIT +# => version │ 1.0.0 +# => repository │ [row type url] +# => publisher │ vscode +# => categories │ [table 0 rows] +# => keywords │ [table 1 rows] +# => engines │ [row vscode] +# => activationEvents │ [table 1 rows] +# => main │ ./out/extension +# => contributes │ [row configuration grammars languages] +# => scripts │ [row compile postinstall test vscode:prepublish watch] +# => devDependencies │ [row @types/mocha @types/node tslint typescript vscode vscode-languageclient] +# => ──────────────────┴─────────────────────────────────────────────────────────────────────────────── diff --git a/snippets/moving_around/cp_example.sh b/snippets/moving_around/cp_example.sh index c135675be47..535fd0fddf6 100644 --- a/snippets/moving_around/cp_example.sh +++ b/snippets/moving_around/cp_example.sh @@ -1 +1 @@ -> cp item location +cp item location diff --git a/snippets/moving_around/ls_example.sh b/snippets/moving_around/ls_example.sh index 416b681c7e5..9e2740c64c8 100644 --- a/snippets/moving_around/ls_example.sh +++ b/snippets/moving_around/ls_example.sh @@ -1 +1 @@ -> ls +ls diff --git a/snippets/moving_around/ls_shallow_glob_example.sh b/snippets/moving_around/ls_shallow_glob_example.sh index 47fb2d8bf57..cbf2fc59954 100644 --- a/snippets/moving_around/ls_shallow_glob_example.sh +++ b/snippets/moving_around/ls_shallow_glob_example.sh @@ -1,9 +1,9 @@ -> ls *.md -───┬────────────────────┬──────┬─────────┬──────────── - # │ name │ type │ size │ modified -───┼────────────────────┼──────┼─────────┼──────────── - 0 │ CODE_OF_CONDUCT.md │ File │ 3.4 KB │ 5 days ago - 1 │ CONTRIBUTING.md │ File │ 886 B │ 5 days ago - 2 │ README.md │ File │ 15.0 KB │ 5 days ago - 3 │ TODO.md │ File │ 1.6 KB │ 5 days ago -───┴────────────────────┴──────┴─────────┴──────────── +ls *.md +# => ───┬────────────────────┬──────┬─────────┬──────────── +# => # │ name │ type │ size │ modified +# => ───┼────────────────────┼──────┼─────────┼──────────── +# => 0 │ CODE_OF_CONDUCT.md │ File │ 3.4 KB │ 5 days ago +# => 1 │ CONTRIBUTING.md │ File │ 886 B │ 5 days ago +# => 2 │ README.md │ File │ 15.0 KB │ 5 days ago +# => 3 │ TODO.md │ File │ 1.6 KB │ 5 days ago +# => ───┴────────────────────┴──────┴─────────┴──────────── diff --git a/snippets/moving_around/mkdir_example.sh b/snippets/moving_around/mkdir_example.sh index 210851917b6..1b31d8068cc 100644 --- a/snippets/moving_around/mkdir_example.sh +++ b/snippets/moving_around/mkdir_example.sh @@ -1 +1 @@ -> mkdir new_directory +mkdir new_directory diff --git a/snippets/moving_around/mv_example.sh b/snippets/moving_around/mv_example.sh index 8b5d65604b8..715952eaaa4 100644 --- a/snippets/moving_around/mv_example.sh +++ b/snippets/moving_around/mv_example.sh @@ -1 +1 @@ -> mv item location +mv item location diff --git a/snippets/moving_around/rm_example.sh b/snippets/moving_around/rm_example.sh index 7d0a07dd034..cd354c81e64 100644 --- a/snippets/moving_around/rm_example.sh +++ b/snippets/moving_around/rm_example.sh @@ -1 +1 @@ -> rm item +rm item diff --git a/snippets/types_of_data/cell-paths.sh b/snippets/types_of_data/cell-paths.sh index 27b7f600593..7cd2da8fc89 100644 --- a/snippets/types_of_data/cell-paths.sh +++ b/snippets/types_of_data/cell-paths.sh @@ -1,7 +1,7 @@ -> [{langs:[Rust JS Python], releases:60}].0 -╭──────────┬────────────────╮ -│ langs │ [list 3 items] │ -│ releases │ 60 │ -╰──────────┴────────────────╯ -> [{langs:[Rust JS Python], releases:60}].0.langs.2 -Python +[{langs:[Rust JS Python], releases:60}].0 +# => ╭──────────┬────────────────╮ +# => │ langs │ [list 3 items] │ +# => │ releases │ 60 │ +# => ╰──────────┴────────────────╯ +[{langs:[Rust JS Python], releases:60}].0.langs.2 +# => Python