diff --git a/docs/commands/alias.md b/docs/commands/alias.md
index 3f3b71dcc..df184075c 100644
--- a/docs/commands/alias.md
+++ b/docs/commands/alias.md
@@ -21,4 +21,3 @@ Alias ll to ls -l
```shell
> alias ll = ls -l
```
-
diff --git a/docs/commands/all.md b/docs/commands/all.md
index 272ebac66..263f92e38 100644
--- a/docs/commands/all.md
+++ b/docs/commands/all.md
@@ -25,4 +25,3 @@ Check that all values are even
```shell
> echo [2 4 6 8] | all? ($it mod 2) == 0
```
-
diff --git a/docs/commands/ansi.md b/docs/commands/ansi.md
index b9c195278..f1ff577f4 100644
--- a/docs/commands/ansi.md
+++ b/docs/commands/ansi.md
@@ -43,4 +43,3 @@ Use ansi to color text with a style (blue on red in bold)
```shell
> $"(ansi -e { fg: '#0000ff' bg: '#ff0000' attr: b })Hello Nu World(ansi reset)"
```
-
diff --git a/docs/commands/ansi_gradient.md b/docs/commands/ansi_gradient.md
index 44278c33f..f0e70ab0f 100644
--- a/docs/commands/ansi_gradient.md
+++ b/docs/commands/ansi_gradient.md
@@ -39,4 +39,3 @@ draw text in a gradient by specifying foreground end color - start color is assu
```shell
> echo 'Hello, Nushell! This is a gradient.' | ansi gradient --fgend 0xe81cff
```
-
diff --git a/docs/commands/ansi_strip.md b/docs/commands/ansi_strip.md
index beebcebac..ebd3ceedc 100644
--- a/docs/commands/ansi_strip.md
+++ b/docs/commands/ansi_strip.md
@@ -20,4 +20,3 @@ strip ansi escape sequences from string
```shell
> echo [ (ansi green) (ansi cursor_on) "hello" ] | str collect | ansi strip
```
-
diff --git a/docs/commands/any.md b/docs/commands/any.md
index 5c7885833..0729341c7 100644
--- a/docs/commands/any.md
+++ b/docs/commands/any.md
@@ -25,4 +25,3 @@ Check if any of the values is odd
```shell
> echo [2 4 1 6 8] | any? ($it mod 2) == 1
```
-
diff --git a/docs/commands/append.md b/docs/commands/append.md
index 5e2fd2369..ea8422ab0 100644
--- a/docs/commands/append.md
+++ b/docs/commands/append.md
@@ -30,4 +30,3 @@ Append Ints and Strings
```shell
> [0,1] | append [2,nu,4,shell]
```
-
diff --git a/docs/commands/benchmark.md b/docs/commands/benchmark.md
index dff15e71d..8346db615 100644
--- a/docs/commands/benchmark.md
+++ b/docs/commands/benchmark.md
@@ -20,4 +20,3 @@ Benchmarks a command within a block
```shell
> benchmark { sleep 500ms }
```
-
diff --git a/docs/commands/build-string.md b/docs/commands/build-string.md
index 9cade6eca..446034907 100644
--- a/docs/commands/build-string.md
+++ b/docs/commands/build-string.md
@@ -25,4 +25,3 @@ Builds a string from letters a b c
```shell
> build-string (1 + 2) = one ' ' plus ' ' two
```
-
diff --git a/docs/commands/cal.md b/docs/commands/cal.md
index 43761715c..a11f2a5a6 100644
--- a/docs/commands/cal.md
+++ b/docs/commands/cal.md
@@ -35,4 +35,3 @@ This month's calendar with the week starting on monday
```shell
> cal --week-start monday
```
-
diff --git a/docs/commands/cd.md b/docs/commands/cd.md
index 95a866324..d3dc19afe 100644
--- a/docs/commands/cd.md
+++ b/docs/commands/cd.md
@@ -20,4 +20,3 @@ Change to your home directory
```shell
> cd ~
```
-
diff --git a/docs/commands/char.md b/docs/commands/char.md
index 023c319d7..f3a281700 100644
--- a/docs/commands/char.md
+++ b/docs/commands/char.md
@@ -38,4 +38,3 @@ Output multi-byte Unicode character
```shell
> char -u 1F468 200D 1F466 200D 1F466
```
-
diff --git a/docs/commands/clear.md b/docs/commands/clear.md
index 707beba4e..f691daacf 100644
--- a/docs/commands/clear.md
+++ b/docs/commands/clear.md
@@ -16,4 +16,3 @@ Clear the terminal
```shell
> clear
```
-
diff --git a/docs/commands/collect.md b/docs/commands/collect.md
index 55d28ce70..f8e09ca6d 100644
--- a/docs/commands/collect.md
+++ b/docs/commands/collect.md
@@ -20,4 +20,3 @@ Use the second value in the stream
```shell
> echo 1 2 3 | collect { |x| echo $x.1 }
```
-
diff --git a/docs/commands/columns.md b/docs/commands/columns.md
index fc10da024..06f882102 100644
--- a/docs/commands/columns.md
+++ b/docs/commands/columns.md
@@ -26,4 +26,3 @@ Get the second column from the table
```shell
> [[name,age,grade]; [bill,20,a]] | columns | select 1
```
-
diff --git a/docs/commands/compact.md b/docs/commands/compact.md
index dd022fdc8..54f99847a 100644
--- a/docs/commands/compact.md
+++ b/docs/commands/compact.md
@@ -30,4 +30,3 @@ Filter out all instances of nothing from a list (Returns [1,2]
```shell
> echo [1, $nothing, 2] | compact
```
-
diff --git a/docs/commands/cp.md b/docs/commands/cp.md
index 3ffecf1cf..5bfbb1b00 100644
--- a/docs/commands/cp.md
+++ b/docs/commands/cp.md
@@ -27,4 +27,3 @@ Recursively copy dir_a to dir_b
```shell
> cp -r dir_a dir_b
```
-
diff --git a/docs/commands/dataframe.md b/docs/commands/dataframe.md
index a92966d88..f92aa1bba 100644
--- a/docs/commands/dataframe.md
+++ b/docs/commands/dataframe.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> dataframe ```
-
diff --git a/docs/commands/date.md b/docs/commands/date.md
index b4c721332..00fbc8d4b 100644
--- a/docs/commands/date.md
+++ b/docs/commands/date.md
@@ -9,4 +9,3 @@ date
## Signature
```> date ```
-
diff --git a/docs/commands/date_format.md b/docs/commands/date_format.md
index e7d1d8876..002d1c1ed 100644
--- a/docs/commands/date_format.md
+++ b/docs/commands/date_format.md
@@ -36,4 +36,3 @@ Format a given date using a given format string.
```shell
> "2021-10-22 20:00:12 +01:00" | date format "%Y-%m-%d"
```
-
diff --git a/docs/commands/date_humanize.md b/docs/commands/date_humanize.md
index 1c055d4ea..dd5a68226 100644
--- a/docs/commands/date_humanize.md
+++ b/docs/commands/date_humanize.md
@@ -21,4 +21,3 @@ Print a 'humanized' format for the date, relative to now.
```shell
> "2021-10-22 20:00:12 +01:00" | date humanize
```
-
diff --git a/docs/commands/date_list-timezone.md b/docs/commands/date_list-timezone.md
index 0152705b6..1be9be2e1 100644
--- a/docs/commands/date_list-timezone.md
+++ b/docs/commands/date_list-timezone.md
@@ -16,4 +16,3 @@ Show timezone(s) that contains 'Shanghai'
```shell
> date list-timezone | where timezone =~ Shanghai
```
-
diff --git a/docs/commands/date_now.md b/docs/commands/date_now.md
index 42aca8f4f..0d7bb378d 100644
--- a/docs/commands/date_now.md
+++ b/docs/commands/date_now.md
@@ -16,4 +16,3 @@ Get the current date and display it in a given format string.
```shell
> date now | date format "%Y-%m-%d %H:%M:%S"
```
-
diff --git a/docs/commands/date_to-table.md b/docs/commands/date_to-table.md
index 7730df2ab..20c32b027 100644
--- a/docs/commands/date_to-table.md
+++ b/docs/commands/date_to-table.md
@@ -26,4 +26,3 @@ Print the date in a structured table.
```shell
> '2020-04-12 22:10:57 +0200' | date to-table
```
-
diff --git a/docs/commands/date_to-timezone.md b/docs/commands/date_to-timezone.md
index 45facf108..35631f0a0 100644
--- a/docs/commands/date_to-timezone.md
+++ b/docs/commands/date_to-timezone.md
@@ -35,4 +35,3 @@ Get the current date in Hawaii
```shell
> "2020-10-10 10:00:00 +02:00" | date to-timezone "+0500"
```
-
diff --git a/docs/commands/debug.md b/docs/commands/debug.md
index 3cf7146f6..e240d0211 100644
--- a/docs/commands/debug.md
+++ b/docs/commands/debug.md
@@ -20,4 +20,3 @@ Describe the type of a string
```shell
> 'hello' | debug
```
-
diff --git a/docs/commands/decode.md b/docs/commands/decode.md
index caf50f30c..ec99d045f 100644
--- a/docs/commands/decode.md
+++ b/docs/commands/decode.md
@@ -20,4 +20,3 @@ Decode the output of an external command
```shell
> cat myfile.q | decode utf-8
```
-
diff --git a/docs/commands/def-env.md b/docs/commands/def-env.md
index 2e6c50742..45020044f 100644
--- a/docs/commands/def-env.md
+++ b/docs/commands/def-env.md
@@ -16,3 +16,9 @@ Define a custom command, which participates in the caller environment
- `params`: parameters
- `block`: body of the definition
+## Examples
+
+Set environment variable by call a custom command
+```shell
+> def-env foo [] { let-env BAR = "BAZ" }; foo; $env.BAR
+```
diff --git a/docs/commands/def.md b/docs/commands/def.md
index eec60c22d..c6b57984a 100644
--- a/docs/commands/def.md
+++ b/docs/commands/def.md
@@ -27,4 +27,3 @@ Define a command and run it with parameter(s)
```shell
> def say-sth [sth: string] { echo $sth }; say-sth hi
```
-
diff --git a/docs/commands/default.md b/docs/commands/default.md
index 5d131fd5e..13f06bc9d 100644
--- a/docs/commands/default.md
+++ b/docs/commands/default.md
@@ -21,4 +21,3 @@ Give a default 'target' to all file entries
```shell
> ls -la | default target 'nothing'
```
-
diff --git a/docs/commands/describe.md b/docs/commands/describe.md
index 8d1077956..4a417fe42 100644
--- a/docs/commands/describe.md
+++ b/docs/commands/describe.md
@@ -16,4 +16,3 @@ Describe the type of a string
```shell
> 'hello' | describe
```
-
diff --git a/docs/commands/detect_columns.md b/docs/commands/detect_columns.md
index ce8ee7c49..66d788446 100644
--- a/docs/commands/detect_columns.md
+++ b/docs/commands/detect_columns.md
@@ -26,4 +26,3 @@ Splits a multi-line string into columns with headers detected
```shell
> echo $'c1 c2 c3(char nl)a b c' | detect columns
```
-
diff --git a/docs/commands/dfr.md b/docs/commands/dfr.md
index 72823100b..d6de13469 100644
--- a/docs/commands/dfr.md
+++ b/docs/commands/dfr.md
@@ -9,4 +9,3 @@ Dataframe commands
## Signature
```> dfr ```
-
diff --git a/docs/commands/dfr_aggregate.md b/docs/commands/dfr_aggregate.md
index 5eab69c81..cf8c937d9 100644
--- a/docs/commands/dfr_aggregate.md
+++ b/docs/commands/dfr_aggregate.md
@@ -12,7 +12,7 @@ Performs an aggregation operation on a dataframe and groupby object
## Parameters
- - `operation_name`:
+ - `operation_name`:
Dataframes: mean, sum, min, max, quantile, median, var, std
GroupBy: mean, sum, min, max, first, last, nunique, quantile, median, var, std, count
- `--quantile {number}`: quantile value for quantile operation
@@ -34,4 +34,3 @@ Aggregate sum in series
```shell
> [4 1 5 6] | dfr to-df | dfr aggregate sum
```
-
diff --git a/docs/commands/dfr_all-false.md b/docs/commands/dfr_all-false.md
index c909882d8..3530af79f 100644
--- a/docs/commands/dfr_all-false.md
+++ b/docs/commands/dfr_all-false.md
@@ -23,4 +23,3 @@ Checks the result from a comparison
let res = ($s > 9);
$res | dfr all-false
```
-
diff --git a/docs/commands/dfr_all-true.md b/docs/commands/dfr_all-true.md
index 9b63b48c0..ee35eecdc 100644
--- a/docs/commands/dfr_all-true.md
+++ b/docs/commands/dfr_all-true.md
@@ -23,4 +23,3 @@ Checks the result from a comparison
let res = ($s > 9);
$res | dfr all-true
```
-
diff --git a/docs/commands/dfr_append.md b/docs/commands/dfr_append.md
index 08384bf59..4b56b91b2 100644
--- a/docs/commands/dfr_append.md
+++ b/docs/commands/dfr_append.md
@@ -28,4 +28,3 @@ Appends a dataframe merging at the end of columns
> let a = ([[a b]; [1 2] [3 4]] | dfr to-df);
$a | dfr append $a --col
```
-
diff --git a/docs/commands/dfr_arg-max.md b/docs/commands/dfr_arg-max.md
index 2014de169..63d6d8eed 100644
--- a/docs/commands/dfr_arg-max.md
+++ b/docs/commands/dfr_arg-max.md
@@ -16,4 +16,3 @@ Returns index for max value
```shell
> [1 3 2] | dfr to-df | dfr arg-max
```
-
diff --git a/docs/commands/dfr_arg-min.md b/docs/commands/dfr_arg-min.md
index 34beae741..0436de940 100644
--- a/docs/commands/dfr_arg-min.md
+++ b/docs/commands/dfr_arg-min.md
@@ -16,4 +16,3 @@ Returns index for min value
```shell
> [1 3 2] | dfr to-df | dfr arg-min
```
-
diff --git a/docs/commands/dfr_arg-sort.md b/docs/commands/dfr_arg-sort.md
index dab3b6bca..6291dbee7 100644
--- a/docs/commands/dfr_arg-sort.md
+++ b/docs/commands/dfr_arg-sort.md
@@ -25,4 +25,3 @@ Returns indexes for a sorted series
```shell
> [1 2 2 3 3] | dfr to-df | dfr arg-sort -r
```
-
diff --git a/docs/commands/dfr_arg-true.md b/docs/commands/dfr_arg-true.md
index ba24b2340..902b4a4fe 100644
--- a/docs/commands/dfr_arg-true.md
+++ b/docs/commands/dfr_arg-true.md
@@ -16,4 +16,3 @@ Returns indexes where values are true
```shell
> [$false $true $false] | dfr to-df | dfr arg-true
```
-
diff --git a/docs/commands/dfr_arg-unique.md b/docs/commands/dfr_arg-unique.md
index 4e0a7a437..5cd57bead 100644
--- a/docs/commands/dfr_arg-unique.md
+++ b/docs/commands/dfr_arg-unique.md
@@ -16,4 +16,3 @@ Returns indexes for unique values
```shell
> [1 2 2 3 3] | dfr to-df | dfr arg-unique
```
-
diff --git a/docs/commands/dfr_column.md b/docs/commands/dfr_column.md
index 64e6c6d59..580e4a719 100644
--- a/docs/commands/dfr_column.md
+++ b/docs/commands/dfr_column.md
@@ -20,4 +20,3 @@ Returns the selected column as series
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr column a
```
-
diff --git a/docs/commands/dfr_concatenate.md b/docs/commands/dfr_concatenate.md
index 3595c10d2..0530a3bf7 100644
--- a/docs/commands/dfr_concatenate.md
+++ b/docs/commands/dfr_concatenate.md
@@ -21,4 +21,3 @@ Concatenate string
> let other = ([za xs cd] | dfr to-df);
[abc abc abc] | dfr to-df | dfr concatenate $other
```
-
diff --git a/docs/commands/dfr_contains.md b/docs/commands/dfr_contains.md
index 57b041801..130867c57 100644
--- a/docs/commands/dfr_contains.md
+++ b/docs/commands/dfr_contains.md
@@ -20,4 +20,3 @@ Returns boolean indicating if pattern was found
```shell
> [abc acb acb] | dfr to-df | dfr contains ab
```
-
diff --git a/docs/commands/dfr_count-null.md b/docs/commands/dfr_count-null.md
index 7a2fe62c4..3003a6028 100644
--- a/docs/commands/dfr_count-null.md
+++ b/docs/commands/dfr_count-null.md
@@ -17,4 +17,3 @@ Counts null values
> let s = ([1 1 0 0 3 3 4] | dfr to-df);
($s / $s) | dfr count-null
```
-
diff --git a/docs/commands/dfr_count-unique.md b/docs/commands/dfr_count-unique.md
index 62254704f..3e18189a6 100644
--- a/docs/commands/dfr_count-unique.md
+++ b/docs/commands/dfr_count-unique.md
@@ -16,4 +16,3 @@ Counts unique values
```shell
> [1 1 2 2 3 3 4] | dfr to-df | dfr count-unique
```
-
diff --git a/docs/commands/dfr_cumulative.md b/docs/commands/dfr_cumulative.md
index d87eb669f..71abb2e04 100644
--- a/docs/commands/dfr_cumulative.md
+++ b/docs/commands/dfr_cumulative.md
@@ -21,4 +21,3 @@ Cumulative sum for a series
```shell
> [1 2 3 4 5] | dfr to-df | dfr cumulative sum
```
-
diff --git a/docs/commands/dfr_describe.md b/docs/commands/dfr_describe.md
index 9b6636647..f4474d344 100644
--- a/docs/commands/dfr_describe.md
+++ b/docs/commands/dfr_describe.md
@@ -16,4 +16,3 @@ dataframe description
```shell
> [[a b]; [1 1] [1 1]] | dfr to-df | dfr describe
```
-
diff --git a/docs/commands/dfr_drop-duplicates.md b/docs/commands/dfr_drop-duplicates.md
index 518ee6a49..e16bedeaa 100644
--- a/docs/commands/dfr_drop-duplicates.md
+++ b/docs/commands/dfr_drop-duplicates.md
@@ -21,4 +21,3 @@ drop duplicates
```shell
> [[a b]; [1 2] [3 4] [1 2]] | dfr to-df | dfr drop-duplicates
```
-
diff --git a/docs/commands/dfr_drop-nulls.md b/docs/commands/dfr_drop-nulls.md
index deab1a921..c99015800 100644
--- a/docs/commands/dfr_drop-nulls.md
+++ b/docs/commands/dfr_drop-nulls.md
@@ -29,4 +29,3 @@ drop null values in dataframe
> let s = ([1 2 0 0 3 4] | dfr to-df);
($s / $s) | dfr drop-nulls
```
-
diff --git a/docs/commands/dfr_drop.md b/docs/commands/dfr_drop.md
index aa1ee0a3d..d3373456b 100644
--- a/docs/commands/dfr_drop.md
+++ b/docs/commands/dfr_drop.md
@@ -20,4 +20,3 @@ drop column a
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr drop a
```
-
diff --git a/docs/commands/dfr_dtypes.md b/docs/commands/dfr_dtypes.md
index 858346e9d..99b528259 100644
--- a/docs/commands/dfr_dtypes.md
+++ b/docs/commands/dfr_dtypes.md
@@ -16,4 +16,3 @@ Dataframe dtypes
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr dtypes
```
-
diff --git a/docs/commands/dfr_filter-with.md b/docs/commands/dfr_filter-with.md
index 1fcc5afbd..ed588884d 100644
--- a/docs/commands/dfr_filter-with.md
+++ b/docs/commands/dfr_filter-with.md
@@ -21,4 +21,3 @@ Filter dataframe using a bool mask
> let mask = ([$true $false] | dfr to-df);
[[a b]; [1 2] [3 4]] | dfr to-df | dfr filter-with $mask
```
-
diff --git a/docs/commands/dfr_first.md b/docs/commands/dfr_first.md
index 2b40d2c70..de743be15 100644
--- a/docs/commands/dfr_first.md
+++ b/docs/commands/dfr_first.md
@@ -20,4 +20,3 @@ Create new dataframe with head rows
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr first 1
```
-
diff --git a/docs/commands/dfr_get-day.md b/docs/commands/dfr_get-day.md
index 9cc9567f1..9a692c8f6 100644
--- a/docs/commands/dfr_get-day.md
+++ b/docs/commands/dfr_get-day.md
@@ -18,4 +18,3 @@ Returns day from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-day
```
-
diff --git a/docs/commands/dfr_get-hour.md b/docs/commands/dfr_get-hour.md
index 443640f97..e51823c64 100644
--- a/docs/commands/dfr_get-hour.md
+++ b/docs/commands/dfr_get-hour.md
@@ -18,4 +18,3 @@ Returns hour from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-hour
```
-
diff --git a/docs/commands/dfr_get-minute.md b/docs/commands/dfr_get-minute.md
index fbccf721d..7316bd0c4 100644
--- a/docs/commands/dfr_get-minute.md
+++ b/docs/commands/dfr_get-minute.md
@@ -18,4 +18,3 @@ Returns minute from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-minute
```
-
diff --git a/docs/commands/dfr_get-month.md b/docs/commands/dfr_get-month.md
index 57130547b..4257dccab 100644
--- a/docs/commands/dfr_get-month.md
+++ b/docs/commands/dfr_get-month.md
@@ -18,4 +18,3 @@ Returns month from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-month
```
-
diff --git a/docs/commands/dfr_get-nanosecond.md b/docs/commands/dfr_get-nanosecond.md
index c305567c9..18f5e84eb 100644
--- a/docs/commands/dfr_get-nanosecond.md
+++ b/docs/commands/dfr_get-nanosecond.md
@@ -18,4 +18,3 @@ Returns nanosecond from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-nanosecond
```
-
diff --git a/docs/commands/dfr_get-ordinal.md b/docs/commands/dfr_get-ordinal.md
index 484cd2c98..db4aa854a 100644
--- a/docs/commands/dfr_get-ordinal.md
+++ b/docs/commands/dfr_get-ordinal.md
@@ -18,4 +18,3 @@ Returns ordinal from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-ordinal
```
-
diff --git a/docs/commands/dfr_get-second.md b/docs/commands/dfr_get-second.md
index 882776c6b..b7dc1fc64 100644
--- a/docs/commands/dfr_get-second.md
+++ b/docs/commands/dfr_get-second.md
@@ -18,4 +18,3 @@ Returns second from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-second
```
-
diff --git a/docs/commands/dfr_get-week.md b/docs/commands/dfr_get-week.md
index 775ab6678..1cc9d4f79 100644
--- a/docs/commands/dfr_get-week.md
+++ b/docs/commands/dfr_get-week.md
@@ -18,4 +18,3 @@ Returns week from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-week
```
-
diff --git a/docs/commands/dfr_get-weekday.md b/docs/commands/dfr_get-weekday.md
index 41a084c5a..542e1d28e 100644
--- a/docs/commands/dfr_get-weekday.md
+++ b/docs/commands/dfr_get-weekday.md
@@ -18,4 +18,3 @@ Returns weekday from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-weekday
```
-
diff --git a/docs/commands/dfr_get-year.md b/docs/commands/dfr_get-year.md
index 3c8af6909..d77d9ff75 100644
--- a/docs/commands/dfr_get-year.md
+++ b/docs/commands/dfr_get-year.md
@@ -18,4 +18,3 @@ Returns year from a date
let df = ([$dt $dt] | dfr to-df);
$df | dfr get-year
```
-
diff --git a/docs/commands/dfr_get.md b/docs/commands/dfr_get.md
index 520731343..a291a0341 100644
--- a/docs/commands/dfr_get.md
+++ b/docs/commands/dfr_get.md
@@ -20,4 +20,3 @@ Creates dataframe with selected columns
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr get a
```
-
diff --git a/docs/commands/dfr_group-by.md b/docs/commands/dfr_group-by.md
index 64db45ca9..3582750ca 100644
--- a/docs/commands/dfr_group-by.md
+++ b/docs/commands/dfr_group-by.md
@@ -20,4 +20,3 @@ Grouping by column a
```shell
> [[a b]; [one 1] [one 2]] | dfr to-df | dfr group-by a
```
-
diff --git a/docs/commands/dfr_is-duplicated.md b/docs/commands/dfr_is-duplicated.md
index 0e264a983..6e80bc78b 100644
--- a/docs/commands/dfr_is-duplicated.md
+++ b/docs/commands/dfr_is-duplicated.md
@@ -16,4 +16,3 @@ Create mask indicating duplicated values
```shell
> [5 6 6 6 8 8 8] | dfr to-df | dfr is-duplicated
```
-
diff --git a/docs/commands/dfr_is-in.md b/docs/commands/dfr_is-in.md
index 2537726a1..dfcf67a23 100644
--- a/docs/commands/dfr_is-in.md
+++ b/docs/commands/dfr_is-in.md
@@ -21,4 +21,3 @@ Checks if elements from a series are contained in right series
> let other = ([1 3 6] | dfr to-df);
[5 6 6 6 8 8 8] | dfr to-df | dfr is-in $other
```
-
diff --git a/docs/commands/dfr_is-not-null.md b/docs/commands/dfr_is-not-null.md
index 631e31bec..9b7453a65 100644
--- a/docs/commands/dfr_is-not-null.md
+++ b/docs/commands/dfr_is-not-null.md
@@ -18,4 +18,3 @@ Create mask where values are not null
let res = ($s / $s);
$res | dfr is-not-null
```
-
diff --git a/docs/commands/dfr_is-null.md b/docs/commands/dfr_is-null.md
index 1a59cae55..c101520c6 100644
--- a/docs/commands/dfr_is-null.md
+++ b/docs/commands/dfr_is-null.md
@@ -18,4 +18,3 @@ Create mask where values are null
let res = ($s / $s);
$res | dfr is-null
```
-
diff --git a/docs/commands/dfr_is-unique.md b/docs/commands/dfr_is-unique.md
index 670f9dcdc..844f43d92 100644
--- a/docs/commands/dfr_is-unique.md
+++ b/docs/commands/dfr_is-unique.md
@@ -16,4 +16,3 @@ Create mask indicating unique values
```shell
> [5 6 6 6 8 8 8] | dfr to-df | dfr is-unique
```
-
diff --git a/docs/commands/dfr_join.md b/docs/commands/dfr_join.md
index 0b6de5e01..ad92a0bce 100644
--- a/docs/commands/dfr_join.md
+++ b/docs/commands/dfr_join.md
@@ -25,4 +25,3 @@ inner join dataframe
> let right = ([[a b c]; [1 2 5] [3 4 5] [5 6 6]] | dfr to-df);
$right | dfr join $right -l [a b] -r [a b]
```
-
diff --git a/docs/commands/dfr_last.md b/docs/commands/dfr_last.md
index 6234ee432..330090561 100644
--- a/docs/commands/dfr_last.md
+++ b/docs/commands/dfr_last.md
@@ -20,4 +20,3 @@ Create new dataframe with last rows
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr last 1
```
-
diff --git a/docs/commands/dfr_melt.md b/docs/commands/dfr_melt.md
index f939c4b55..f7e31d4fa 100644
--- a/docs/commands/dfr_melt.md
+++ b/docs/commands/dfr_melt.md
@@ -23,4 +23,3 @@ melt dataframe
```shell
> [[a b c d]; [x 1 4 a] [y 2 5 b] [z 3 6 c]] | dfr to-df | dfr melt -c [b c] -v [a d]
```
-
diff --git a/docs/commands/dfr_not.md b/docs/commands/dfr_not.md
index a81943de3..e244f4cfa 100644
--- a/docs/commands/dfr_not.md
+++ b/docs/commands/dfr_not.md
@@ -16,4 +16,3 @@ Inverts boolean mask
```shell
> [$true $false $true] | dfr to-df | dfr not
```
-
diff --git a/docs/commands/dfr_open.md b/docs/commands/dfr_open.md
index 19c6b66b7..2ba3ae81b 100644
--- a/docs/commands/dfr_open.md
+++ b/docs/commands/dfr_open.md
@@ -25,4 +25,3 @@ Takes a file name and creates a dataframe
```shell
> dfr open test.csv
```
-
diff --git a/docs/commands/dfr_pivot.md b/docs/commands/dfr_pivot.md
index 668072410..399b4951f 100644
--- a/docs/commands/dfr_pivot.md
+++ b/docs/commands/dfr_pivot.md
@@ -22,4 +22,3 @@ Pivot a dataframe on b and aggregation on col c
```shell
> [[a b c]; [one x 1] [two y 2]] | dfr to-df | dfr group-by a | dfr pivot b c sum
```
-
diff --git a/docs/commands/dfr_rename-col.md b/docs/commands/dfr_rename-col.md
index f1c9f3e6e..f3515d99a 100644
--- a/docs/commands/dfr_rename-col.md
+++ b/docs/commands/dfr_rename-col.md
@@ -21,4 +21,3 @@ Renames a dataframe column
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr rename-col a a_new
```
-
diff --git a/docs/commands/dfr_rename.md b/docs/commands/dfr_rename.md
index 68fc84e9a..5d8612354 100644
--- a/docs/commands/dfr_rename.md
+++ b/docs/commands/dfr_rename.md
@@ -20,4 +20,3 @@ Renames a series
```shell
> [5 6 7 8] | dfr to-df | dfr rename new_name
```
-
diff --git a/docs/commands/dfr_replace-all.md b/docs/commands/dfr_replace-all.md
index f9cda671e..e23cbd78c 100644
--- a/docs/commands/dfr_replace-all.md
+++ b/docs/commands/dfr_replace-all.md
@@ -21,4 +21,3 @@ Replaces string
```shell
> [abac abac abac] | dfr to-df | dfr replace-all -p a -r A
```
-
diff --git a/docs/commands/dfr_replace.md b/docs/commands/dfr_replace.md
index cb6e1c1c6..b4850aca5 100644
--- a/docs/commands/dfr_replace.md
+++ b/docs/commands/dfr_replace.md
@@ -21,4 +21,3 @@ Replaces string
```shell
> [abc abc abc] | dfr to-df | dfr replace -p ab -r AB
```
-
diff --git a/docs/commands/dfr_rolling.md b/docs/commands/dfr_rolling.md
index 83d267397..cb21085a6 100644
--- a/docs/commands/dfr_rolling.md
+++ b/docs/commands/dfr_rolling.md
@@ -26,4 +26,3 @@ Rolling max for a series
```shell
> [1 2 3 4 5] | dfr to-df | dfr rolling max 2 | dfr drop-nulls
```
-
diff --git a/docs/commands/dfr_sample.md b/docs/commands/dfr_sample.md
index 0647f52a1..13ff12014 100644
--- a/docs/commands/dfr_sample.md
+++ b/docs/commands/dfr_sample.md
@@ -27,4 +27,3 @@ Shows sample row using fraction and replace
```shell
> [[a b]; [1 2] [3 4] [5 6]] | dfr to-df | dfr sample -f 0.5 -e
```
-
diff --git a/docs/commands/dfr_set-with-idx.md b/docs/commands/dfr_set-with-idx.md
index 9dd1228da..55a41052f 100644
--- a/docs/commands/dfr_set-with-idx.md
+++ b/docs/commands/dfr_set-with-idx.md
@@ -23,4 +23,3 @@ Set value in selected rows from series
let indices = ([0 2] | dfr to-df);
$series | dfr set-with-idx 6 -i $indices
```
-
diff --git a/docs/commands/dfr_set.md b/docs/commands/dfr_set.md
index 5fccaa9a9..5999f4b58 100644
--- a/docs/commands/dfr_set.md
+++ b/docs/commands/dfr_set.md
@@ -23,4 +23,3 @@ Shifts the values by a given period
let mask = ($s | dfr is-null);
$s | dfr set 0 --mask $mask
```
-
diff --git a/docs/commands/dfr_shape.md b/docs/commands/dfr_shape.md
index 21b4f2e48..b2b16ec83 100644
--- a/docs/commands/dfr_shape.md
+++ b/docs/commands/dfr_shape.md
@@ -16,4 +16,3 @@ Shows row and column shape
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr shape
```
-
diff --git a/docs/commands/dfr_shift.md b/docs/commands/dfr_shift.md
index 68dc9a998..71b3d229f 100644
--- a/docs/commands/dfr_shift.md
+++ b/docs/commands/dfr_shift.md
@@ -20,4 +20,3 @@ Shifts the values by a given period
```shell
> [1 2 2 3 3] | dfr to-df | dfr shift 2 | dfr drop-nulls
```
-
diff --git a/docs/commands/dfr_slice.md b/docs/commands/dfr_slice.md
index 589f49194..59f64eda1 100644
--- a/docs/commands/dfr_slice.md
+++ b/docs/commands/dfr_slice.md
@@ -21,4 +21,3 @@ Create new dataframe from a slice of the rows
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr slice 0 1
```
-
diff --git a/docs/commands/dfr_sort.md b/docs/commands/dfr_sort.md
index 5004359d7..db83ad70d 100644
--- a/docs/commands/dfr_sort.md
+++ b/docs/commands/dfr_sort.md
@@ -26,4 +26,3 @@ Create new sorted series
```shell
> [3 4 1 2] | dfr to-df | dfr sort
```
-
diff --git a/docs/commands/dfr_str-lengths.md b/docs/commands/dfr_str-lengths.md
index 8bce5ae75..98770ee99 100644
--- a/docs/commands/dfr_str-lengths.md
+++ b/docs/commands/dfr_str-lengths.md
@@ -16,4 +16,3 @@ Returns string lengths
```shell
> [a ab abc] | dfr to-df | dfr str-lengths
```
-
diff --git a/docs/commands/dfr_str-slice.md b/docs/commands/dfr_str-slice.md
index ae02cd762..18b56d247 100644
--- a/docs/commands/dfr_str-slice.md
+++ b/docs/commands/dfr_str-slice.md
@@ -21,4 +21,3 @@ Creates slices from the strings
```shell
> [abcded abc321 abc123] | dfr to-df | dfr str-slice 1 -l 2
```
-
diff --git a/docs/commands/dfr_strftime.md b/docs/commands/dfr_strftime.md
index 7162c1299..e51f169bc 100644
--- a/docs/commands/dfr_strftime.md
+++ b/docs/commands/dfr_strftime.md
@@ -22,4 +22,3 @@ Formats date
let df = ([$dt $dt] | dfr to-df);
$df | dfr strftime "%Y/%m/%d"
```
-
diff --git a/docs/commands/dfr_take.md b/docs/commands/dfr_take.md
index cb5886dc4..96146c5d5 100644
--- a/docs/commands/dfr_take.md
+++ b/docs/commands/dfr_take.md
@@ -29,4 +29,3 @@ Takes selected rows from series
let indices = ([0 2] | dfr to-df);
$series | dfr take $indices
```
-
diff --git a/docs/commands/dfr_to-csv.md b/docs/commands/dfr_to-csv.md
index ae170dd6a..c97f79f47 100644
--- a/docs/commands/dfr_to-csv.md
+++ b/docs/commands/dfr_to-csv.md
@@ -27,4 +27,3 @@ Saves dataframe to csv file using other delimiter
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr to-csv test.csv -d '|'
```
-
diff --git a/docs/commands/dfr_to-df.md b/docs/commands/dfr_to-df.md
index 820834785..c4186fdbf 100644
--- a/docs/commands/dfr_to-df.md
+++ b/docs/commands/dfr_to-df.md
@@ -31,4 +31,3 @@ Takes a list of booleans and creates a dataframe
```shell
> [$true $true $false] | dfr to-df
```
-
diff --git a/docs/commands/dfr_to-dummies.md b/docs/commands/dfr_to-dummies.md
index 63e2f330a..e28287838 100644
--- a/docs/commands/dfr_to-dummies.md
+++ b/docs/commands/dfr_to-dummies.md
@@ -21,4 +21,3 @@ Create new dataframe with dummy variables from a series
```shell
> [1 2 2 3 3] | dfr to-df | dfr to-dummies
```
-
diff --git a/docs/commands/dfr_to-lowercase.md b/docs/commands/dfr_to-lowercase.md
index a10d52604..a497c18a0 100644
--- a/docs/commands/dfr_to-lowercase.md
+++ b/docs/commands/dfr_to-lowercase.md
@@ -16,4 +16,3 @@ Modifies strings to lowercase
```shell
> [Abc aBc abC] | dfr to-df | dfr to-lowercase
```
-
diff --git a/docs/commands/dfr_to-nu.md b/docs/commands/dfr_to-nu.md
index c0980cbbe..ad37a0e32 100644
--- a/docs/commands/dfr_to-nu.md
+++ b/docs/commands/dfr_to-nu.md
@@ -26,4 +26,3 @@ Shows tail rows from dataframe
```shell
> [[a b]; [1 2] [3 4] [5 6]] | dfr to-df | dfr to-nu -t -n 1
```
-
diff --git a/docs/commands/dfr_to-parquet.md b/docs/commands/dfr_to-parquet.md
index 62efad328..8d3a216d0 100644
--- a/docs/commands/dfr_to-parquet.md
+++ b/docs/commands/dfr_to-parquet.md
@@ -20,4 +20,3 @@ Saves dataframe to csv file
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr to-parquet test.parquet
```
-
diff --git a/docs/commands/dfr_to-uppercase.md b/docs/commands/dfr_to-uppercase.md
index d89b2f3a1..4e47ebefa 100644
--- a/docs/commands/dfr_to-uppercase.md
+++ b/docs/commands/dfr_to-uppercase.md
@@ -16,4 +16,3 @@ Modifies strings to uppercase
```shell
> [Abc aBc abC] | dfr to-df | dfr to-uppercase
```
-
diff --git a/docs/commands/dfr_unique.md b/docs/commands/dfr_unique.md
index 19bd68766..587108b24 100644
--- a/docs/commands/dfr_unique.md
+++ b/docs/commands/dfr_unique.md
@@ -16,4 +16,3 @@ Returns unique values from a series
```shell
> [2 2 2 2 2] | dfr to-df | dfr unique
```
-
diff --git a/docs/commands/dfr_value-counts.md b/docs/commands/dfr_value-counts.md
index cf5788f0d..a3dffb6e8 100644
--- a/docs/commands/dfr_value-counts.md
+++ b/docs/commands/dfr_value-counts.md
@@ -16,4 +16,3 @@ Calculates value counts
```shell
> [5 5 5 5 6 6] | dfr to-df | dfr value-counts
```
-
diff --git a/docs/commands/dfr_with-column.md b/docs/commands/dfr_with-column.md
index 76b740dd5..7d70b9de2 100644
--- a/docs/commands/dfr_with-column.md
+++ b/docs/commands/dfr_with-column.md
@@ -21,4 +21,3 @@ Adds a series to the dataframe
```shell
> [[a b]; [1 2] [3 4]] | dfr to-df | dfr with-column ([5 6] | dfr to-df) --name c
```
-
diff --git a/docs/commands/do.md b/docs/commands/do.md
index 5678f11a7..6643f2680 100644
--- a/docs/commands/do.md
+++ b/docs/commands/do.md
@@ -27,4 +27,3 @@ Run the block and ignore errors
```shell
> do -i { thisisnotarealcommand }
```
-
diff --git a/docs/commands/drop.md b/docs/commands/drop.md
index 4253fb2ac..efd84620e 100644
--- a/docs/commands/drop.md
+++ b/docs/commands/drop.md
@@ -30,4 +30,3 @@ Remove the last two items of a list/table
```shell
> [0,1,2,3] | drop 2
```
-
diff --git a/docs/commands/drop_column.md b/docs/commands/drop_column.md
index 50c581de4..8343baa60 100644
--- a/docs/commands/drop_column.md
+++ b/docs/commands/drop_column.md
@@ -20,4 +20,3 @@ Remove the last column of a table
```shell
> echo [[lib, extension]; [nu-lib, rs] [nu-core, rb]] | drop column
```
-
diff --git a/docs/commands/drop_nth.md b/docs/commands/drop_nth.md
index dd612fe51..9b26489f6 100644
--- a/docs/commands/drop_nth.md
+++ b/docs/commands/drop_nth.md
@@ -41,4 +41,3 @@ Drop range rows from second to fourth
```shell
> echo [first second third fourth fifth] | drop nth (1..3)
```
-
diff --git a/docs/commands/du.md b/docs/commands/du.md
index 3fa5e2622..ec29935b5 100644
--- a/docs/commands/du.md
+++ b/docs/commands/du.md
@@ -25,4 +25,3 @@ Disk usage of the current directory
```shell
> du
```
-
diff --git a/docs/commands/each.md b/docs/commands/each.md
index 2f9056a54..5c1460c42 100644
--- a/docs/commands/each.md
+++ b/docs/commands/each.md
@@ -21,4 +21,3 @@ Multiplies elements in list
```shell
> [1 2 3] | each { |it| 2 * $it }
```
-
diff --git a/docs/commands/each_group.md b/docs/commands/each_group.md
index acd2fceca..2d54b0fec 100644
--- a/docs/commands/each_group.md
+++ b/docs/commands/each_group.md
@@ -21,4 +21,3 @@ Echo the sum of each pair
```shell
> echo [1 2 3 4] | each group 2 { |it| $it.0 + $it.1 }
```
-
diff --git a/docs/commands/each_window.md b/docs/commands/each_window.md
index 99dbe7798..de874ec61 100644
--- a/docs/commands/each_window.md
+++ b/docs/commands/each_window.md
@@ -27,4 +27,3 @@ A sliding window of two elements, with a stride of 3
```shell
> [1, 2, 3, 4, 5, 6, 7, 8] | each window 2 --stride 3 { |x| $x.0 + $x.1 }
```
-
diff --git a/docs/commands/echo.md b/docs/commands/echo.md
index 588e916b5..3463fe463 100644
--- a/docs/commands/echo.md
+++ b/docs/commands/echo.md
@@ -25,4 +25,3 @@ Print the value of the special '$nu' variable
```shell
> echo $nu
```
-
diff --git a/docs/commands/empty.md b/docs/commands/empty.md
index 3c274605f..a8b20b56f 100644
--- a/docs/commands/empty.md
+++ b/docs/commands/empty.md
@@ -31,4 +31,3 @@ use a block if setting the empty cell contents is wanted
```shell
> [[2020/04/16 2020/07/10 2020/11/16]; ['' [27] [37]]] | empty? 2020/04/16 -b { |_| [33 37] }
```
-
diff --git a/docs/commands/enter.md b/docs/commands/enter.md
index 6135c03a8..0e29c3824 100644
--- a/docs/commands/enter.md
+++ b/docs/commands/enter.md
@@ -13,4 +13,3 @@ Enters a new shell at the given path.
## Parameters
- `path`: the path to enter as a new shell
-
diff --git a/docs/commands/env.md b/docs/commands/env.md
index 051995528..953b1ea62 100644
--- a/docs/commands/env.md
+++ b/docs/commands/env.md
@@ -26,4 +26,3 @@ Another way to check whether the env variable `PATH` exists
```shell
> 'PATH' in (env).name
```
-
diff --git a/docs/commands/error_make.md b/docs/commands/error_make.md
index df678ca82..88cfc17c6 100644
--- a/docs/commands/error_make.md
+++ b/docs/commands/error_make.md
@@ -23,4 +23,3 @@ Create a custom error for a custom command
error make {msg: "this is fishy", label: {text: "fish right here", start: $span.start, end: $span.end } }
}
```
-
diff --git a/docs/commands/every.md b/docs/commands/every.md
index 009e8a60a..4c40fc207 100644
--- a/docs/commands/every.md
+++ b/docs/commands/every.md
@@ -26,4 +26,3 @@ Skip every second row
```shell
> [1 2 3 4 5] | every 2 --skip
```
-
diff --git a/docs/commands/exec.md b/docs/commands/exec.md
index 3a7ee5338..e012e8e7f 100644
--- a/docs/commands/exec.md
+++ b/docs/commands/exec.md
@@ -26,4 +26,3 @@ Execute 'nautilus'
```shell
> exec nautilus
```
-
diff --git a/docs/commands/exit.md b/docs/commands/exit.md
index 3adcb71ec..575605245 100644
--- a/docs/commands/exit.md
+++ b/docs/commands/exit.md
@@ -26,4 +26,3 @@ Exit all shells (exiting Nu)
```shell
> exit --now
```
-
diff --git a/docs/commands/export.md b/docs/commands/export.md
index 65d60b284..b70bfb4c9 100644
--- a/docs/commands/export.md
+++ b/docs/commands/export.md
@@ -9,4 +9,3 @@ Export custom commands or environment variables from a module.
## Signature
```> export ```
-
diff --git a/docs/commands/export_def-env.md b/docs/commands/export_def-env.md
index 82c15c42f..7b078041c 100644
--- a/docs/commands/export_def-env.md
+++ b/docs/commands/export_def-env.md
@@ -16,3 +16,9 @@ Define a custom command that participates in the environment and export it from
- `params`: parameters
- `block`: body of the definition
+## Examples
+
+Define a custom command that participates in the environment in a module and call it
+```shell
+> module foo { export def-env bar [] { let-env FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR
+```
diff --git a/docs/commands/export_def.md b/docs/commands/export_def.md
index b20d576bb..c6263aac4 100644
--- a/docs/commands/export_def.md
+++ b/docs/commands/export_def.md
@@ -16,3 +16,9 @@ Define a custom command and export it from a module
- `params`: parameters
- `block`: body of the definition
+## Examples
+
+Define a custom command in a module and call it
+```shell
+> module spam { export def foo [] { "foo" } }; use spam foo; foo
+```
diff --git a/docs/commands/export_env.md b/docs/commands/export_env.md
index 5a3403c26..a692c8442 100644
--- a/docs/commands/export_env.md
+++ b/docs/commands/export_env.md
@@ -15,3 +15,9 @@ Export a block from a module that will be evaluated as an environment variable w
- `name`: name of the environment variable
- `block`: body of the environment variable definition
+## Examples
+
+Import and evaluate environment variable from a module
+```shell
+> module foo { export env FOO_ENV { "BAZ" } }; use foo FOO_ENV; $env.FOO_ENV
+```
diff --git a/docs/commands/extern.md b/docs/commands/extern.md
index b41d37d8c..f80834c39 100644
--- a/docs/commands/extern.md
+++ b/docs/commands/extern.md
@@ -14,4 +14,3 @@ Define a signature for an external command
- `def_name`: definition name
- `params`: parameters
-
diff --git a/docs/commands/fetch.md b/docs/commands/fetch.md
index 40e644655..6f2fcccb2 100644
--- a/docs/commands/fetch.md
+++ b/docs/commands/fetch.md
@@ -16,7 +16,7 @@ Fetch the contents from a URL (HTTP GET operation).
- `--user {any}`: the username when authenticating
- `--password {any}`: the password when authenticating
- `--timeout {int}`: timeout period in seconds
- - `--headers {any}`: custom headers you want to add
+ - `--headers {any}`: custom headers you want to add
- `--raw`: fetch contents as text rather than a table
## Examples
@@ -35,4 +35,3 @@ Fetch content from url.com, with custom header
```shell
> fetch -H [my-header-key my-header-value] url.com
```
-
diff --git a/docs/commands/find.md b/docs/commands/find.md
index 206003cc3..5ba8e207d 100644
--- a/docs/commands/find.md
+++ b/docs/commands/find.md
@@ -46,4 +46,3 @@ Find if a service is not running
```shell
> echo [[version patch]; [0.1.0 $false] [0.1.1 $true] [0.2.0 $false]] | find -p { |it| $it.patch }
```
-
diff --git a/docs/commands/first.md b/docs/commands/first.md
index 1e6553451..17cc2af1c 100644
--- a/docs/commands/first.md
+++ b/docs/commands/first.md
@@ -25,4 +25,3 @@ Return the first 2 items of a list/table
```shell
> [1 2 3] | first 2
```
-
diff --git a/docs/commands/flatten.md b/docs/commands/flatten.md
index c428bb89d..080fa3b8d 100644
--- a/docs/commands/flatten.md
+++ b/docs/commands/flatten.md
@@ -18,7 +18,7 @@ Flatten the table.
flatten a table
```shell
-> [[N, u, s, h, e, l, l]] | flatten
+> [[N, u, s, h, e, l, l]] | flatten
```
flatten a table, get the first item
@@ -40,4 +40,3 @@ Flatten inner table
```shell
> { a: b, d: [ 1 2 3 4 ], e: [ 4 3 ] } | flatten
```
-
diff --git a/docs/commands/fmt.md b/docs/commands/fmt.md
index fbd485b63..12b3a5a11 100644
--- a/docs/commands/fmt.md
+++ b/docs/commands/fmt.md
@@ -16,4 +16,3 @@ format numbers
```shell
> 42 | fmt
```
-
diff --git a/docs/commands/for.md b/docs/commands/for.md
index 97d59525d..f6a237803 100644
--- a/docs/commands/for.md
+++ b/docs/commands/for.md
@@ -33,4 +33,3 @@ Number each item and echo a message
```shell
> for $it in ['bob' 'fred'] --numbered { $"($it.index) is ($it.item)" }
```
-
diff --git a/docs/commands/format.md b/docs/commands/format.md
index a6b4da7df..9853ad628 100644
--- a/docs/commands/format.md
+++ b/docs/commands/format.md
@@ -25,4 +25,3 @@ Print elements from some columns of a table
```shell
> echo [[col1, col2]; [v1, v2] [v3, v4]] | format '{col2}'
```
-
diff --git a/docs/commands/from.md b/docs/commands/from.md
index 8d8216d24..e1bb2d26b 100644
--- a/docs/commands/from.md
+++ b/docs/commands/from.md
@@ -9,4 +9,3 @@ Parse a string or binary data into structured data
## Signature
```> from ```
-
diff --git a/docs/commands/from_csv.md b/docs/commands/from_csv.md
index b1e8ac55a..fa26f8e0f 100644
--- a/docs/commands/from_csv.md
+++ b/docs/commands/from_csv.md
@@ -36,4 +36,3 @@ Convert semicolon-separated data to a table
```shell
> open data.txt | from csv --separator ';'
```
-
diff --git a/docs/commands/from_eml.md b/docs/commands/from_eml.md
index 78c0ffcbc..efe727454 100644
--- a/docs/commands/from_eml.md
+++ b/docs/commands/from_eml.md
@@ -33,4 +33,3 @@ To: someone@somewhere.com
Test' | from eml -b 1
```
-
diff --git a/docs/commands/from_ics.md b/docs/commands/from_ics.md
index 746fa8952..56edc02ed 100644
--- a/docs/commands/from_ics.md
+++ b/docs/commands/from_ics.md
@@ -17,4 +17,3 @@ Converts ics formatted string to table
> 'BEGIN:VCALENDAR
END:VCALENDAR' | from ics
```
-
diff --git a/docs/commands/from_ini.md b/docs/commands/from_ini.md
index f0a390e48..dd6f04aa4 100644
--- a/docs/commands/from_ini.md
+++ b/docs/commands/from_ini.md
@@ -18,4 +18,3 @@ Converts ini formatted string to table
a=1
b=2' | from ini
```
-
diff --git a/docs/commands/from_json.md b/docs/commands/from_json.md
index b4bef7724..0ed7446d4 100644
--- a/docs/commands/from_json.md
+++ b/docs/commands/from_json.md
@@ -18,11 +18,10 @@ Convert from json to structured data
Converts json formatted string to table
```shell
-> '{ a:1 }' | from json
+> '{ "a": 1 }' | from json
```
Converts json formatted string to table
```shell
-> '{ a:1, b: [1, 2] }' | from json
+> '{ "a": 1, "b": [1, 2] }' | from json
```
-
diff --git a/docs/commands/from_nuon.md b/docs/commands/from_nuon.md
new file mode 100644
index 000000000..071a3264d
--- /dev/null
+++ b/docs/commands/from_nuon.md
@@ -0,0 +1,23 @@
+---
+title: from nuon
+layout: command
+version: 0.59.0
+---
+
+Convert from nuon to structured data
+
+## Signature
+
+```> from nuon ```
+
+## Examples
+
+Converts nuon formatted string to table
+```shell
+> '{ a:1 }' | from nuon
+```
+
+Converts nuon formatted string to table
+```shell
+> '{ a:1, b: [1, 2] }' | from nuon
+```
diff --git a/docs/commands/from_ods.md b/docs/commands/from_ods.md
index 8946d0d10..7156eaa21 100644
--- a/docs/commands/from_ods.md
+++ b/docs/commands/from_ods.md
@@ -25,4 +25,3 @@ Convert binary .ods data to a table, specifying the tables
```shell
> open test.txt | from ods -s [Spreadsheet1]
```
-
diff --git a/docs/commands/from_ssv.md b/docs/commands/from_ssv.md
index 8f2833a03..7100aa562 100644
--- a/docs/commands/from_ssv.md
+++ b/docs/commands/from_ssv.md
@@ -29,4 +29,3 @@ Converts ssv formatted string to table but not treating the first row as column
> 'FOO BAR
1 2' | from ssv -n
```
-
diff --git a/docs/commands/from_toml.md b/docs/commands/from_toml.md
index 2aeab4316..bcea31321 100644
--- a/docs/commands/from_toml.md
+++ b/docs/commands/from_toml.md
@@ -22,4 +22,3 @@ Converts toml formatted string to table
> 'a = 1
b = [1, 2]' | from toml
```
-
diff --git a/docs/commands/from_tsv.md b/docs/commands/from_tsv.md
index 9a7c493d0..84f1f7116 100644
--- a/docs/commands/from_tsv.md
+++ b/docs/commands/from_tsv.md
@@ -14,3 +14,14 @@ Parse text as .tsv and create table.
- `--noheaders`: don't treat the first row as column names
+## Examples
+
+Create a tsv file with header columns and open it
+```shell
+> echo $'c1(char tab)c2(char tab)c3(char nl)1(char tab)2(char tab)3' | save tsv-data | open tsv-data | from tsv
+```
+
+Create a tsv file without header columns and open it
+```shell
+> echo $'a1(char tab)b1(char tab)c1(char nl)a2(char tab)b2(char tab)c2' | save tsv-data | open tsv-data | from tsv -n
+```
diff --git a/docs/commands/from_url.md b/docs/commands/from_url.md
index c33ad5d35..391419fea 100644
--- a/docs/commands/from_url.md
+++ b/docs/commands/from_url.md
@@ -16,4 +16,3 @@ Convert url encoded string into a table
```shell
> 'bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter' | from url
```
-
diff --git a/docs/commands/from_vcf.md b/docs/commands/from_vcf.md
index 92169f55e..fb3d55450 100644
--- a/docs/commands/from_vcf.md
+++ b/docs/commands/from_vcf.md
@@ -20,4 +20,3 @@ FN:Bar
EMAIL:foo@bar.com
END:VCARD' | from vcf
```
-
diff --git a/docs/commands/from_xlsx.md b/docs/commands/from_xlsx.md
index fac03ebf2..e45408c6e 100644
--- a/docs/commands/from_xlsx.md
+++ b/docs/commands/from_xlsx.md
@@ -25,4 +25,3 @@ Convert binary .xlsx data to a table, specifying the tables
```shell
> open test.txt | from xlsx -s [Spreadsheet1]
```
-
diff --git a/docs/commands/from_xml.md b/docs/commands/from_xml.md
index 51558afb6..61844e4aa 100644
--- a/docs/commands/from_xml.md
+++ b/docs/commands/from_xml.md
@@ -19,4 +19,3 @@ Converts xml formatted string to table
Event
' | from xml
```
-
diff --git a/docs/commands/from_yaml.md b/docs/commands/from_yaml.md
index 1ec63706b..7ac7ec7b3 100644
--- a/docs/commands/from_yaml.md
+++ b/docs/commands/from_yaml.md
@@ -21,4 +21,3 @@ Converts yaml formatted string to table
```shell
> '[ a: 1, b: [1, 2] ]' | from yaml
```
-
diff --git a/docs/commands/from_yml.md b/docs/commands/from_yml.md
index 31d2cb5a7..f177d6942 100644
--- a/docs/commands/from_yml.md
+++ b/docs/commands/from_yml.md
@@ -10,3 +10,14 @@ Parse text as .yaml/.yml and create table.
```> from yml ```
+## Examples
+
+Converts yaml formatted string to table
+```shell
+> 'a: 1' | from yaml
+```
+
+Converts yaml formatted string to table
+```shell
+> '[ a: 1, b: [1, 2] ]' | from yaml
+```
diff --git a/docs/commands/g.md b/docs/commands/g.md
index 54318ba7f..f401242b9 100644
--- a/docs/commands/g.md
+++ b/docs/commands/g.md
@@ -13,4 +13,3 @@ Switch to a given shell.
## Parameters
- `shell_number`: shell number to change to
-
diff --git a/docs/commands/get.md b/docs/commands/get.md
index 2dc145d66..fb6be3742 100644
--- a/docs/commands/get.md
+++ b/docs/commands/get.md
@@ -37,4 +37,3 @@ Extract the cpu list from the sys information record
```shell
> sys | get cpu
```
-
diff --git a/docs/commands/grid.md b/docs/commands/grid.md
index 5175f9d86..85415c99a 100644
--- a/docs/commands/grid.md
+++ b/docs/commands/grid.md
@@ -15,4 +15,3 @@ Renders the output to a textual terminal grid.
- `--width {int}`: number of terminal columns wide (not output columns)
- `--color`: draw output with color
- `--separator {string}`: character to separate grid with
-
diff --git a/docs/commands/group-by.md b/docs/commands/group-by.md
index b9407cc19..72c3f84a9 100644
--- a/docs/commands/group-by.md
+++ b/docs/commands/group-by.md
@@ -25,4 +25,3 @@ you can also group by raw values by leaving out the argument
```shell
> echo ['1' '3' '1' '3' '2' '1' '1'] | group-by
```
-
diff --git a/docs/commands/hash.md b/docs/commands/hash.md
index 1384d9c54..e01293b7b 100644
--- a/docs/commands/hash.md
+++ b/docs/commands/hash.md
@@ -9,4 +9,3 @@ Apply hash function.
## Signature
```> hash ```
-
diff --git a/docs/commands/hash_base64.md b/docs/commands/hash_base64.md
index b7ceed25a..f0ee5f3a2 100644
--- a/docs/commands/hash_base64.md
+++ b/docs/commands/hash_base64.md
@@ -34,4 +34,3 @@ Base64 decode a value
```shell
> echo 'dXNlcm5hbWU6cGFzc3dvcmQ=' | hash base64 --decode
```
-
diff --git a/docs/commands/hash_md5.md b/docs/commands/hash_md5.md
index 2f5091770..e992824dc 100644
--- a/docs/commands/hash_md5.md
+++ b/docs/commands/hash_md5.md
@@ -25,4 +25,3 @@ md5 encode a file
```shell
> open ./nu_0_24_1_windows.zip | hash md5
```
-
diff --git a/docs/commands/hash_sha256.md b/docs/commands/hash_sha256.md
index 21acd0921..73514b08e 100644
--- a/docs/commands/hash_sha256.md
+++ b/docs/commands/hash_sha256.md
@@ -25,4 +25,3 @@ sha256 encode a file
```shell
> open ./nu_0_24_1_windows.zip | hash sha256
```
-
diff --git a/docs/commands/headers.md b/docs/commands/headers.md
index 8415786e5..3b24732ef 100644
--- a/docs/commands/headers.md
+++ b/docs/commands/headers.md
@@ -21,4 +21,3 @@ Don't panic on rows with different headers
```shell
> "a b c|1 2 3|1 2 3 4" | split row "|" | split column " " | headers
```
-
diff --git a/docs/commands/help.md b/docs/commands/help.md
index 8d66060a9..15a11ab59 100644
--- a/docs/commands/help.md
+++ b/docs/commands/help.md
@@ -41,4 +41,3 @@ search for string in command usage
```shell
> help --find char
```
-
diff --git a/docs/commands/hide.md b/docs/commands/hide.md
index 644bebea8..85ce028f1 100644
--- a/docs/commands/hide.md
+++ b/docs/commands/hide.md
@@ -14,3 +14,19 @@ Hide symbols in the current scope
- `pattern`: import pattern
+## Examples
+
+Hide the alias just defined
+```shell
+> alias lll = ls -l; hide lll
+```
+
+Hide a custom command
+```shell
+> def say-hi [] { echo 'Hi!' }; hide say-hi
+```
+
+Hide an environment variable
+```shell
+> let-env HZ_ENV_ABC = 1; hide HZ_ENV_ABC; 'HZ_ENV_ABC' in (env).name
+```
diff --git a/docs/commands/history.md b/docs/commands/history.md
index 4da7c1908..79962ac4a 100644
--- a/docs/commands/history.md
+++ b/docs/commands/history.md
@@ -14,3 +14,19 @@ Get the command history
- `--clear`: Clears out the history entries
+## Examples
+
+Get current history length
+```shell
+> history | length
+```
+
+Show last 5 commands you have ran
+```shell
+> history | last 5
+```
+
+Search all the commands from history that contains 'cargo'
+```shell
+> history | wrap cmd | where cmd =~ cargo
+```
diff --git a/docs/commands/if.md b/docs/commands/if.md
index 4600dd1aa..89fc68df0 100644
--- a/docs/commands/if.md
+++ b/docs/commands/if.md
@@ -32,4 +32,3 @@ Chain multiple if's together
```shell
> if 5 < 3 { 'yes!' } else if 4 < 5 { 'no!' } else { 'okay!' }
```
-
diff --git a/docs/commands/ignore.md b/docs/commands/ignore.md
index 957912281..58756bc1b 100644
--- a/docs/commands/ignore.md
+++ b/docs/commands/ignore.md
@@ -16,4 +16,3 @@ Ignore the output of an echo command
```shell
> echo done | ignore
```
-
diff --git a/docs/commands/input.md b/docs/commands/input.md
index 5862bc2bd..08a9ac0b2 100644
--- a/docs/commands/input.md
+++ b/docs/commands/input.md
@@ -21,4 +21,3 @@ Get input from the user, and assign to a variable
```shell
> let user-input = (input)
```
-
diff --git a/docs/commands/insert.md b/docs/commands/insert.md
index 41a26e52e..6d19883a5 100644
--- a/docs/commands/insert.md
+++ b/docs/commands/insert.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> insert ```
-
diff --git a/docs/commands/into.md b/docs/commands/into.md
index 9e59d4402..2ce343924 100644
--- a/docs/commands/into.md
+++ b/docs/commands/into.md
@@ -9,4 +9,3 @@ Apply into function.
## Signature
```> into ```
-
diff --git a/docs/commands/into_binary.md b/docs/commands/into_binary.md
index 2157dd374..3a547b117 100644
--- a/docs/commands/into_binary.md
+++ b/docs/commands/into_binary.md
@@ -45,4 +45,3 @@ convert a decimal to a nushell binary primitive
```shell
> 1.234 | into binary
```
-
diff --git a/docs/commands/into_bool.md b/docs/commands/into_bool.md
index 693a5cce8..f57dfe642 100644
--- a/docs/commands/into_bool.md
+++ b/docs/commands/into_bool.md
@@ -40,4 +40,3 @@ convert string to boolean
```shell
> 'true' | into bool
```
-
diff --git a/docs/commands/into_datetime.md b/docs/commands/into_datetime.md
index 310e04c83..c7bfdc671 100644
--- a/docs/commands/into_datetime.md
+++ b/docs/commands/into_datetime.md
@@ -44,4 +44,3 @@ Convert timestamp (no larger than 8e+12) to datetime using a specified timezone
```shell
> '1614434140' | into datetime -o +9
```
-
diff --git a/docs/commands/into_decimal.md b/docs/commands/into_decimal.md
index e8d0fbc5f..31cd06666 100644
--- a/docs/commands/into_decimal.md
+++ b/docs/commands/into_decimal.md
@@ -30,4 +30,3 @@ Convert decimal to integer
```shell
> '-5.9' | into decimal
```
-
diff --git a/docs/commands/into_filesize.md b/docs/commands/into_filesize.md
index 25aa74b53..52f004355 100644
--- a/docs/commands/into_filesize.md
+++ b/docs/commands/into_filesize.md
@@ -40,4 +40,3 @@ Convert file size to filesize
```shell
> 4KB | into filesize
```
-
diff --git a/docs/commands/into_int.md b/docs/commands/into_int.md
index a992dbf3d..7c36dfb47 100644
--- a/docs/commands/into_int.md
+++ b/docs/commands/into_int.md
@@ -56,4 +56,3 @@ Convert to integer from hex
```shell
> 'FF' | into int -r 16
```
-
diff --git a/docs/commands/into_string.md b/docs/commands/into_string.md
index d6f036773..ad5914b95 100644
--- a/docs/commands/into_string.md
+++ b/docs/commands/into_string.md
@@ -66,4 +66,3 @@ convert filesize to string
```shell
> ls Cargo.toml | get size | into string
```
-
diff --git a/docs/commands/keep.md b/docs/commands/keep.md
index dfb528556..d2e8aaed4 100644
--- a/docs/commands/keep.md
+++ b/docs/commands/keep.md
@@ -25,4 +25,3 @@ Keep the first value
```shell
> echo [2 4 6 8] | keep
```
-
diff --git a/docs/commands/keep_until.md b/docs/commands/keep_until.md
index f5185f1f1..3c0c8bc92 100644
--- a/docs/commands/keep_until.md
+++ b/docs/commands/keep_until.md
@@ -20,4 +20,3 @@ Keep until the element is positive
```shell
> echo [-1 -2 9 1] | keep until $it > 0
```
-
diff --git a/docs/commands/keep_while.md b/docs/commands/keep_while.md
index 4a5fbf188..28ae0ba07 100644
--- a/docs/commands/keep_while.md
+++ b/docs/commands/keep_while.md
@@ -20,4 +20,3 @@ Keep while the element is negative
```shell
> echo [-1 -2 9 1] | keep while $it < 0
```
-
diff --git a/docs/commands/keybindings.md b/docs/commands/keybindings.md
index db18538f5..cccc88609 100644
--- a/docs/commands/keybindings.md
+++ b/docs/commands/keybindings.md
@@ -9,4 +9,3 @@ Keybindings related commands
## Signature
```> keybindings ```
-
diff --git a/docs/commands/keybindings_default.md b/docs/commands/keybindings_default.md
index 41d9bb49c..7e923e054 100644
--- a/docs/commands/keybindings_default.md
+++ b/docs/commands/keybindings_default.md
@@ -16,4 +16,3 @@ Get list with default keybindings
```shell
> keybindings default
```
-
diff --git a/docs/commands/keybindings_list.md b/docs/commands/keybindings_list.md
index c66c3ae93..de4ed901c 100644
--- a/docs/commands/keybindings_list.md
+++ b/docs/commands/keybindings_list.md
@@ -34,4 +34,3 @@ Get list with all the available options
```shell
> keybindings list
```
-
diff --git a/docs/commands/keybindings_listen.md b/docs/commands/keybindings_listen.md
index 5916c7641..438b165a1 100644
--- a/docs/commands/keybindings_listen.md
+++ b/docs/commands/keybindings_listen.md
@@ -16,4 +16,3 @@ Type and see key event codes
```shell
> keybindings listen
```
-
diff --git a/docs/commands/kill.md b/docs/commands/kill.md
index 0f5061493..459075da0 100644
--- a/docs/commands/kill.md
+++ b/docs/commands/kill.md
@@ -34,4 +34,3 @@ Send INT signal
```shell
> kill -s 2 12345
```
-
diff --git a/docs/commands/last.md b/docs/commands/last.md
index 15f01a08c..bcacef46a 100644
--- a/docs/commands/last.md
+++ b/docs/commands/last.md
@@ -20,4 +20,3 @@ Get the last 2 items
```shell
> [1,2,3] | last 2
```
-
diff --git a/docs/commands/length.md b/docs/commands/length.md
index cf1f780f2..9394399aa 100644
--- a/docs/commands/length.md
+++ b/docs/commands/length.md
@@ -25,4 +25,3 @@ Count the number of columns in the calendar table
```shell
> cal | length -c
```
-
diff --git a/docs/commands/let-env.md b/docs/commands/let-env.md
index 80dda34bc..e276678c9 100644
--- a/docs/commands/let-env.md
+++ b/docs/commands/let-env.md
@@ -21,4 +21,3 @@ Create an environment variable and display it
```shell
> let-env MY_ENV_VAR = 1; $env.MY_ENV_VAR
```
-
diff --git a/docs/commands/let.md b/docs/commands/let.md
index ee931ea90..57b0309b6 100644
--- a/docs/commands/let.md
+++ b/docs/commands/let.md
@@ -31,4 +31,3 @@ Set a variable based on the condition
```shell
> let x = if $false { -1 } else { 1 }
```
-
diff --git a/docs/commands/lines.md b/docs/commands/lines.md
index 735bcd6a1..748dfc1e5 100644
--- a/docs/commands/lines.md
+++ b/docs/commands/lines.md
@@ -20,4 +20,3 @@ Split multi-line string into lines
```shell
> echo $'two(char nl)lines' | lines
```
-
diff --git a/docs/commands/load-env.md b/docs/commands/load-env.md
index 27df1f6ce..41decc5c0 100644
--- a/docs/commands/load-env.md
+++ b/docs/commands/load-env.md
@@ -25,4 +25,3 @@ Load variables from an argument
```shell
> load-env {NAME: ABE, AGE: UNKNOWN}; echo $env.NAME
```
-
diff --git a/docs/commands/ls.md b/docs/commands/ls.md
index 6dccfe59c..deeff589c 100644
--- a/docs/commands/ls.md
+++ b/docs/commands/ls.md
@@ -35,4 +35,3 @@ List all rust files
```shell
> ls *.rs
```
-
diff --git a/docs/commands/math.md b/docs/commands/math.md
index 3359f4d66..0b7ce5468 100644
--- a/docs/commands/math.md
+++ b/docs/commands/math.md
@@ -9,4 +9,3 @@ Use mathematical functions as aggregate functions on a list of numbers or tables
## Signature
```> math ```
-
diff --git a/docs/commands/math_abs.md b/docs/commands/math_abs.md
index 8111e0834..da3314eb3 100644
--- a/docs/commands/math_abs.md
+++ b/docs/commands/math_abs.md
@@ -16,4 +16,3 @@ Get absolute of each value in a list of numbers
```shell
> [-50 -100.0 25] | math abs
```
-
diff --git a/docs/commands/math_avg.md b/docs/commands/math_avg.md
index 4cb05c0ac..29ac2c6af 100644
--- a/docs/commands/math_avg.md
+++ b/docs/commands/math_avg.md
@@ -16,4 +16,3 @@ Get the average of a list of numbers
```shell
> [-50 100.0 25] | math avg
```
-
diff --git a/docs/commands/math_ceil.md b/docs/commands/math_ceil.md
index 69de4ec4d..14afa6a0d 100644
--- a/docs/commands/math_ceil.md
+++ b/docs/commands/math_ceil.md
@@ -16,4 +16,3 @@ Apply the ceil function to a list of numbers
```shell
> [1.5 2.3 -3.1] | math ceil
```
-
diff --git a/docs/commands/math_eval.md b/docs/commands/math_eval.md
index 11618a26a..58073faa3 100644
--- a/docs/commands/math_eval.md
+++ b/docs/commands/math_eval.md
@@ -20,4 +20,3 @@ Evalulate math in the pipeline
```shell
> '10 / 4' | math eval
```
-
diff --git a/docs/commands/math_floor.md b/docs/commands/math_floor.md
index 298850d17..c043dbbc8 100644
--- a/docs/commands/math_floor.md
+++ b/docs/commands/math_floor.md
@@ -16,4 +16,3 @@ Apply the floor function to a list of numbers
```shell
> [1.5 2.3 -3.1] | math floor
```
-
diff --git a/docs/commands/math_max.md b/docs/commands/math_max.md
index e9840fe09..75ec8cca8 100644
--- a/docs/commands/math_max.md
+++ b/docs/commands/math_max.md
@@ -16,4 +16,3 @@ Find the maximum of list of numbers
```shell
> [-50 100 25] | math max
```
-
diff --git a/docs/commands/math_median.md b/docs/commands/math_median.md
index 7b1dde920..5b8024b3d 100644
--- a/docs/commands/math_median.md
+++ b/docs/commands/math_median.md
@@ -16,4 +16,3 @@ Get the median of a list of numbers
```shell
> [3 8 9 12 12 15] | math median
```
-
diff --git a/docs/commands/math_min.md b/docs/commands/math_min.md
index 448d624c5..2ae18c4f6 100644
--- a/docs/commands/math_min.md
+++ b/docs/commands/math_min.md
@@ -16,4 +16,3 @@ Get the minimum of a list of numbers
```shell
> [-50 100 25] | math min
```
-
diff --git a/docs/commands/math_mode.md b/docs/commands/math_mode.md
index 338e96b64..b79775b72 100644
--- a/docs/commands/math_mode.md
+++ b/docs/commands/math_mode.md
@@ -16,4 +16,3 @@ Get the mode(s) of a list of numbers
```shell
> [3 3 9 12 12 15] | math mode
```
-
diff --git a/docs/commands/math_product.md b/docs/commands/math_product.md
index b6633a885..013920121 100644
--- a/docs/commands/math_product.md
+++ b/docs/commands/math_product.md
@@ -16,4 +16,3 @@ Get the product of a list of numbers
```shell
> [2 3 3 4] | math product
```
-
diff --git a/docs/commands/math_round.md b/docs/commands/math_round.md
index ac1a1b475..46b3bce1d 100644
--- a/docs/commands/math_round.md
+++ b/docs/commands/math_round.md
@@ -25,4 +25,3 @@ Apply the round function with precision specified
```shell
> [1.555 2.333 -3.111] | math round -p 2
```
-
diff --git a/docs/commands/math_sqrt.md b/docs/commands/math_sqrt.md
index b1ce57708..bd8f92e3f 100644
--- a/docs/commands/math_sqrt.md
+++ b/docs/commands/math_sqrt.md
@@ -16,4 +16,3 @@ Apply the square root function to a list of numbers
```shell
> [9 16] | math sqrt
```
-
diff --git a/docs/commands/math_stddev.md b/docs/commands/math_stddev.md
index cae8a1da2..a7df58755 100644
--- a/docs/commands/math_stddev.md
+++ b/docs/commands/math_stddev.md
@@ -25,4 +25,3 @@ Get the sample stddev of a list of numbers
```shell
> [1 2 3 4 5] | math stddev -s
```
-
diff --git a/docs/commands/math_sum.md b/docs/commands/math_sum.md
index 02cff3027..a9f19f507 100644
--- a/docs/commands/math_sum.md
+++ b/docs/commands/math_sum.md
@@ -21,4 +21,3 @@ Get the disk usage for the current directory
```shell
> ls | get size | math sum
```
-
diff --git a/docs/commands/math_variance.md b/docs/commands/math_variance.md
index 8d6130918..b81f2dee1 100644
--- a/docs/commands/math_variance.md
+++ b/docs/commands/math_variance.md
@@ -25,4 +25,3 @@ Get the sample variance of a list of numbers
```shell
> [1 2 3 4 5] | math variance -s
```
-
diff --git a/docs/commands/merge.md b/docs/commands/merge.md
index fd29c9168..e6341c3ce 100644
--- a/docs/commands/merge.md
+++ b/docs/commands/merge.md
@@ -25,4 +25,3 @@ Merge two records
```shell
> {a: 1, b: 2} | merge { {c: 3} }
```
-
diff --git a/docs/commands/metadata.md b/docs/commands/metadata.md
index 311d384cf..d155e9768 100644
--- a/docs/commands/metadata.md
+++ b/docs/commands/metadata.md
@@ -25,4 +25,3 @@ Get the metadata of the input
```shell
> ls | metadata
```
-
diff --git a/docs/commands/mkdir.md b/docs/commands/mkdir.md
index 2090042cd..145aeae59 100644
--- a/docs/commands/mkdir.md
+++ b/docs/commands/mkdir.md
@@ -26,4 +26,3 @@ Make multiple directories and show the paths created
```shell
> mkdir -s foo/bar foo2
```
-
diff --git a/docs/commands/module.md b/docs/commands/module.md
index a3498ee0a..46829d4bb 100644
--- a/docs/commands/module.md
+++ b/docs/commands/module.md
@@ -15,3 +15,19 @@ Define a custom module
- `module_name`: module name
- `block`: body of the module
+## Examples
+
+Define a custom command in a module and call it
+```shell
+> module spam { export def foo [] { "foo" } }; use spam foo; foo
+```
+
+Define an environment variable in a module and evaluate it
+```shell
+> module foo { export env FOO_ENV { "BAZ" } }; use foo FOO_ENV; $env.FOO_ENV
+```
+
+Define a custom command that participates in the environment in a module and call it
+```shell
+> module foo { export def-env bar [] { let-env FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR
+```
diff --git a/docs/commands/move.md b/docs/commands/move.md
index 392c31e0d..99b0596f4 100644
--- a/docs/commands/move.md
+++ b/docs/commands/move.md
@@ -32,4 +32,3 @@ Move columns of a record
```shell
> { name: foo, value: a, index: 1 } | move name --before index
```
-
diff --git a/docs/commands/mv.md b/docs/commands/mv.md
index 4403147cf..022822323 100644
--- a/docs/commands/mv.md
+++ b/docs/commands/mv.md
@@ -31,4 +31,3 @@ Move many files into a directory
```shell
> mv *.txt my/subdirectory
```
-
diff --git a/docs/commands/n.md b/docs/commands/n.md
index 4929de276..ae7d7ec83 100644
--- a/docs/commands/n.md
+++ b/docs/commands/n.md
@@ -9,4 +9,3 @@ Switch to the next shell.
## Signature
```> n ```
-
diff --git a/docs/commands/nth.md b/docs/commands/nth.md
index 3e89bdcd1..a38304fc3 100644
--- a/docs/commands/nth.md
+++ b/docs/commands/nth.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> nth ```
-
diff --git a/docs/commands/nu-highlight.md b/docs/commands/nu-highlight.md
index cab86185c..17e71d272 100644
--- a/docs/commands/nu-highlight.md
+++ b/docs/commands/nu-highlight.md
@@ -16,4 +16,3 @@ Describe the type of a string
```shell
> 'let x = 3' | nu-highlight
```
-
diff --git a/docs/commands/open.md b/docs/commands/open.md
index ccc4e0824..a2cdcd934 100644
--- a/docs/commands/open.md
+++ b/docs/commands/open.md
@@ -31,4 +31,3 @@ Open a file, using the input to get filename
```shell
> echo 'myfile.txt' | open
```
-
diff --git a/docs/commands/p.md b/docs/commands/p.md
index da7c5c213..750419827 100644
--- a/docs/commands/p.md
+++ b/docs/commands/p.md
@@ -9,4 +9,3 @@ Switch to the previous shell.
## Signature
```> p ```
-
diff --git a/docs/commands/par-each.md b/docs/commands/par-each.md
index 9e58ce7ab..8cc3dcfa9 100644
--- a/docs/commands/par-each.md
+++ b/docs/commands/par-each.md
@@ -21,4 +21,3 @@ Multiplies elements in list
```shell
> [1 2 3] | par-each { |it| 2 * $it }
```
-
diff --git a/docs/commands/par-each_group.md b/docs/commands/par-each_group.md
index a64bcb492..9197a8f7f 100644
--- a/docs/commands/par-each_group.md
+++ b/docs/commands/par-each_group.md
@@ -21,4 +21,3 @@ Multiplies elements in list
```shell
> echo [1 2 3 4] | par-each group 2 { $it.0 + $it.1 }
```
-
diff --git a/docs/commands/parse.md b/docs/commands/parse.md
index fc48bee36..aa6b74610 100644
--- a/docs/commands/parse.md
+++ b/docs/commands/parse.md
@@ -26,4 +26,3 @@ Parse a string using regex pattern
```shell
> echo "hi there" | parse -r "(?P\w+) (?P\w+)"
```
-
diff --git a/docs/commands/path.md b/docs/commands/path.md
index 8942d4d1b..6b7f7110b 100644
--- a/docs/commands/path.md
+++ b/docs/commands/path.md
@@ -9,4 +9,3 @@ Explore and manipulate paths.
## Signature
```> path ```
-
diff --git a/docs/commands/path_basename.md b/docs/commands/path_basename.md
index a1d3026dc..f090d20a3 100644
--- a/docs/commands/path_basename.md
+++ b/docs/commands/path_basename.md
@@ -31,4 +31,3 @@ Replace basename of a path
```shell
> '/home/joe/test.txt' | path basename -r 'spam.png'
```
-
diff --git a/docs/commands/path_dirname.md b/docs/commands/path_dirname.md
index 98402b302..bc175774b 100644
--- a/docs/commands/path_dirname.md
+++ b/docs/commands/path_dirname.md
@@ -37,4 +37,3 @@ Replace the part that would be returned with a custom path
```shell
> '/home/joe/code/test.txt' | path dirname -n 2 -r /home/viking
```
-
diff --git a/docs/commands/path_exists.md b/docs/commands/path_exists.md
index 73e4c5275..16a3eb6c4 100644
--- a/docs/commands/path_exists.md
+++ b/docs/commands/path_exists.md
@@ -25,4 +25,3 @@ Check if a file exists in a column
```shell
> ls | path exists -c [ name ]
```
-
diff --git a/docs/commands/path_expand.md b/docs/commands/path_expand.md
index 5525e5ccf..a042a211c 100644
--- a/docs/commands/path_expand.md
+++ b/docs/commands/path_expand.md
@@ -31,4 +31,3 @@ Expand a relative path
```shell
> 'foo/../bar' | path expand
```
-
diff --git a/docs/commands/path_join.md b/docs/commands/path_join.md
index b1645ed97..5f3e908ab 100644
--- a/docs/commands/path_join.md
+++ b/docs/commands/path_join.md
@@ -36,4 +36,3 @@ Join a structured path into a path
```shell
> [[ parent stem extension ]; [ '/home/viking' 'spam' 'txt' ]] | path join
```
-
diff --git a/docs/commands/path_parse.md b/docs/commands/path_parse.md
index bfc6662bc..908052dd4 100644
--- a/docs/commands/path_parse.md
+++ b/docs/commands/path_parse.md
@@ -36,4 +36,3 @@ Parse all paths under the 'name' column
```shell
> ls | path parse -c [ name ]
```
-
diff --git a/docs/commands/path_relative-to.md b/docs/commands/path_relative-to.md
index a30d7ff01..cc300ffde 100644
--- a/docs/commands/path_relative-to.md
+++ b/docs/commands/path_relative-to.md
@@ -31,4 +31,3 @@ Find a relative path from two relative paths
```shell
> 'eggs/bacon/sausage/spam' | path relative-to 'eggs/bacon/sausage'
```
-
diff --git a/docs/commands/path_split.md b/docs/commands/path_split.md
index 937ad4048..a62a94ff9 100644
--- a/docs/commands/path_split.md
+++ b/docs/commands/path_split.md
@@ -25,4 +25,3 @@ Split all paths under the 'name' column
```shell
> ls ('.' | path expand) | path split -c [ name ]
```
-
diff --git a/docs/commands/path_type.md b/docs/commands/path_type.md
index 629931d5d..1e11d97d2 100644
--- a/docs/commands/path_type.md
+++ b/docs/commands/path_type.md
@@ -25,4 +25,3 @@ Show type of a filepath in a column
```shell
> ls | path type -c [ name ]
```
-
diff --git a/docs/commands/pivot.md b/docs/commands/pivot.md
index e3cefc955..5400dfeb2 100644
--- a/docs/commands/pivot.md
+++ b/docs/commands/pivot.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> pivot ```
-
diff --git a/docs/commands/post.md b/docs/commands/post.md
index a4fd8956d..3474eb6c0 100644
--- a/docs/commands/post.md
+++ b/docs/commands/post.md
@@ -18,7 +18,7 @@ Post a body to a URL (HTTP POST operation).
- `--password {any}`: the password when authenticating
- `--content-type {any}`: the MIME type of content to post
- `--content-length {any}`: the length of the content being posted
- - `--headers {any}`: custom headers you want to add
+ - `--headers {any}`: custom headers you want to add
- `--raw`: return values as a string instead of a table
- `--insecure`: allow insecure server connections when using SSL
@@ -38,4 +38,3 @@ Post content to url.com, with custom header
```shell
> post -H [my-header-key my-header-value] url.com
```
-
diff --git a/docs/commands/prepend.md b/docs/commands/prepend.md
index 6f4070439..26b6ee602 100644
--- a/docs/commands/prepend.md
+++ b/docs/commands/prepend.md
@@ -30,4 +30,3 @@ Prepend Ints and Strings
```shell
> [2,nu,4,shell] | prepend [0,1,rocks]
```
-
diff --git a/docs/commands/print.md b/docs/commands/print.md
index f983380a9..9edb18013 100644
--- a/docs/commands/print.md
+++ b/docs/commands/print.md
@@ -25,4 +25,3 @@ Print the sum of 2 and 3
```shell
> print (2 + 3)
```
-
diff --git a/docs/commands/ps.md b/docs/commands/ps.md
index 1b121edbd..a50e407db 100644
--- a/docs/commands/ps.md
+++ b/docs/commands/ps.md
@@ -20,4 +20,3 @@ List the system processes
```shell
> ps
```
-
diff --git a/docs/commands/random.md b/docs/commands/random.md
index 7e0bdfd9a..df8b3e861 100644
--- a/docs/commands/random.md
+++ b/docs/commands/random.md
@@ -9,4 +9,3 @@ Generate a random values.
## Signature
```> random ```
-
diff --git a/docs/commands/random_bool.md b/docs/commands/random_bool.md
index 068c9d016..f62162a3f 100644
--- a/docs/commands/random_bool.md
+++ b/docs/commands/random_bool.md
@@ -25,4 +25,3 @@ Generate a random boolean value with a 75% chance of "true"
```shell
> random bool --bias 0.75
```
-
diff --git a/docs/commands/random_chars.md b/docs/commands/random_chars.md
index 894a7ae0c..e2b5079a0 100644
--- a/docs/commands/random_chars.md
+++ b/docs/commands/random_chars.md
@@ -25,4 +25,3 @@ Generate random chars with specified length
```shell
> random chars -l 20
```
-
diff --git a/docs/commands/random_decimal.md b/docs/commands/random_decimal.md
index fdf224eed..b7ba191a8 100644
--- a/docs/commands/random_decimal.md
+++ b/docs/commands/random_decimal.md
@@ -35,4 +35,3 @@ Generate a random decimal between 1.0 and 1.1
```shell
> random decimal 1.0..1.1
```
-
diff --git a/docs/commands/random_dice.md b/docs/commands/random_dice.md
index e1fd1fcc6..b7a5e98f6 100644
--- a/docs/commands/random_dice.md
+++ b/docs/commands/random_dice.md
@@ -26,4 +26,3 @@ Roll 10 dice with 12 sides each
```shell
> random dice -d 10 -s 12
```
-
diff --git a/docs/commands/random_integer.md b/docs/commands/random_integer.md
index dfd1e7e0b..d83f1dcc4 100644
--- a/docs/commands/random_integer.md
+++ b/docs/commands/random_integer.md
@@ -35,4 +35,3 @@ Generate a random integer between 1 and 10
```shell
> random integer 1..10
```
-
diff --git a/docs/commands/random_uuid.md b/docs/commands/random_uuid.md
index caeb52881..ed81c1d35 100644
--- a/docs/commands/random_uuid.md
+++ b/docs/commands/random_uuid.md
@@ -16,4 +16,3 @@ Generate a random uuid4 string
```shell
> random uuid
```
-
diff --git a/docs/commands/range.md b/docs/commands/range.md
index d005e7b26..7c6fb365c 100644
--- a/docs/commands/range.md
+++ b/docs/commands/range.md
@@ -30,4 +30,3 @@ Get the next to last 2 items
```shell
> [0,1,2,3,4,5] | range (-3)..-2
```
-
diff --git a/docs/commands/reduce.md b/docs/commands/reduce.md
index 162b592f6..7fd9860a6 100644
--- a/docs/commands/reduce.md
+++ b/docs/commands/reduce.md
@@ -43,4 +43,3 @@ Find the longest string and its index
}
}
```
-
diff --git a/docs/commands/register.md b/docs/commands/register.md
index f6e59064d..9deff8d9f 100644
--- a/docs/commands/register.md
+++ b/docs/commands/register.md
@@ -17,3 +17,14 @@ Register a plugin
- `--encoding {string}`: Encoding used to communicate with plugin. Options: [capnp, json]
- `--shell {path}`: path of shell used to run plugin (cmd, sh, python, etc)
+## Examples
+
+Register `nu_plugin_extra_query` plugin from ~/.cargo/bin/ dir
+```shell
+> register -e capnp ~/.cargo/bin/nu_plugin_extra_query
+```
+
+Register `nu_plugin_extra_query` plugin from `nu -c`(plugin will be available in that nu session only)
+```shell
+> let plugin = ((which nu).path.0 | path dirname | path join 'nu_plugin_extra_query'); nu -c $'register -e capnp ($plugin); version'
+```
diff --git a/docs/commands/reject.md b/docs/commands/reject.md
index e7cd2881e..259a72c49 100644
--- a/docs/commands/reject.md
+++ b/docs/commands/reject.md
@@ -25,4 +25,3 @@ Reject the specified field in a record
```shell
> echo {a: 1, b: 2} | reject a
```
-
diff --git a/docs/commands/rename.md b/docs/commands/rename.md
index d5f0f2e9e..f8a37e2a8 100644
--- a/docs/commands/rename.md
+++ b/docs/commands/rename.md
@@ -31,4 +31,3 @@ Rename a specific column
```shell
> [[a, b, c]; [1, 2, 3]] | rename -c [a ham]
```
-
diff --git a/docs/commands/reverse.md b/docs/commands/reverse.md
index d3e467867..1735a900b 100644
--- a/docs/commands/reverse.md
+++ b/docs/commands/reverse.md
@@ -16,4 +16,3 @@ Reverse the items
```shell
> [0,1,2,3] | reverse
```
-
diff --git a/docs/commands/rm.md b/docs/commands/rm.md
index 639ddf1e5..136ca8502 100644
--- a/docs/commands/rm.md
+++ b/docs/commands/rm.md
@@ -40,4 +40,3 @@ Delete a file, and suppress errors if no file is found
```shell
> rm --force file.txt
```
-
diff --git a/docs/commands/roll.md b/docs/commands/roll.md
index d51ac1fcc..c57f4c9a4 100644
--- a/docs/commands/roll.md
+++ b/docs/commands/roll.md
@@ -9,4 +9,3 @@ Rolling commands for tables
## Signature
```> roll ```
-
diff --git a/docs/commands/roll_down.md b/docs/commands/roll_down.md
index 93c1f680a..b8b149c41 100644
--- a/docs/commands/roll_down.md
+++ b/docs/commands/roll_down.md
@@ -20,4 +20,3 @@ Rolls rows down
```shell
> [[a b]; [1 2] [3 4] [5 6]] | roll down
```
-
diff --git a/docs/commands/roll_left.md b/docs/commands/roll_left.md
index 2fb196910..b8ec384ca 100644
--- a/docs/commands/roll_left.md
+++ b/docs/commands/roll_left.md
@@ -26,4 +26,3 @@ Rolls columns to the left with fixed headers
```shell
> [[a b c]; [1 2 3] [4 5 6]] | roll left --cells-only
```
-
diff --git a/docs/commands/roll_right.md b/docs/commands/roll_right.md
index d7e7c3875..74a179723 100644
--- a/docs/commands/roll_right.md
+++ b/docs/commands/roll_right.md
@@ -26,4 +26,3 @@ Rolls columns to the right with fixed headers
```shell
> [[a b c]; [1 2 3] [4 5 6]] | roll right --cells-only
```
-
diff --git a/docs/commands/roll_up.md b/docs/commands/roll_up.md
index 750871726..1923c1a9c 100644
--- a/docs/commands/roll_up.md
+++ b/docs/commands/roll_up.md
@@ -20,4 +20,3 @@ Rolls rows up
```shell
> [[a b]; [1 2] [3 4] [5 6]] | roll up
```
-
diff --git a/docs/commands/rotate.md b/docs/commands/rotate.md
index 2b1d441df..a749453b5 100644
--- a/docs/commands/rotate.md
+++ b/docs/commands/rotate.md
@@ -46,4 +46,3 @@ Rotate table counter-clockwise and change columns names
```shell
> [[a b]; [1 2]] | rotate --ccw col_a col_b
```
-
diff --git a/docs/commands/run-external.md b/docs/commands/run-external.md
index 292c1ccc5..1e740cff6 100644
--- a/docs/commands/run-external.md
+++ b/docs/commands/run-external.md
@@ -14,4 +14,3 @@ Runs external command
- `...rest`: external command to run
- `--last-expression`: last-expression
-
diff --git a/docs/commands/save.md b/docs/commands/save.md
index d103d470e..aa0cb84c8 100644
--- a/docs/commands/save.md
+++ b/docs/commands/save.md
@@ -13,5 +13,16 @@ Save a file.
## Parameters
- `filename`: the filename to use
- - `--raw`: open file as raw binary
+ - `--raw`: save file as raw binary
+## Examples
+
+Save a string to foo.txt in current directory
+```shell
+> echo 'save me' | save foo.txt
+```
+
+Save a record to foo.json in current directory
+```shell
+> echo { a: 1, b: 2 } | save foo.json
+```
diff --git a/docs/commands/select.md b/docs/commands/select.md
index 383744960..1a629f2af 100644
--- a/docs/commands/select.md
+++ b/docs/commands/select.md
@@ -25,4 +25,3 @@ Select the name and size columns
```shell
> ls | select name size
```
-
diff --git a/docs/commands/seq.md b/docs/commands/seq.md
index 3226070df..49a1590fe 100644
--- a/docs/commands/seq.md
+++ b/docs/commands/seq.md
@@ -43,4 +43,3 @@ sequence 1 to 10 with pipe separator padded by 2s
```shell
> seq -s ' | ' -w 1 2 10
```
-
diff --git a/docs/commands/seq_date.md b/docs/commands/seq_date.md
index 8e0659e2b..65b7f19aa 100644
--- a/docs/commands/seq_date.md
+++ b/docs/commands/seq_date.md
@@ -52,4 +52,3 @@ starting on May 5th, 2020, print the next 10 days in your locale's date format,
```shell
> seq date -o %x -s ':' -d 10 -b '2020-05-01'
```
-
diff --git a/docs/commands/shells.md b/docs/commands/shells.md
index 74c2999d9..0cb8b3ea4 100644
--- a/docs/commands/shells.md
+++ b/docs/commands/shells.md
@@ -9,4 +9,3 @@ Lists all open shells.
## Signature
```> shells ```
-
diff --git a/docs/commands/shuffle.md b/docs/commands/shuffle.md
index f6c072bc7..3460fdcd2 100644
--- a/docs/commands/shuffle.md
+++ b/docs/commands/shuffle.md
@@ -10,3 +10,9 @@ Shuffle rows randomly.
```> shuffle ```
+## Examples
+
+Shuffle rows randomly (execute it several times and see the difference)
+```shell
+> echo [[version patch]; [1.0.0 $false] [3.0.1 $true] [2.0.0 $false]] | shuffle
+```
diff --git a/docs/commands/size.md b/docs/commands/size.md
index cc21f7a02..651b5db6a 100644
--- a/docs/commands/size.md
+++ b/docs/commands/size.md
@@ -21,4 +21,3 @@ Counts Unicode characters correctly in a string
```shell
> "Amélie Amelie" | size
```
-
diff --git a/docs/commands/skip.md b/docs/commands/skip.md
index 16ef0f2b7..abf718044 100644
--- a/docs/commands/skip.md
+++ b/docs/commands/skip.md
@@ -25,4 +25,3 @@ Skip the first value
```shell
> echo [2 4 6 8] | skip
```
-
diff --git a/docs/commands/skip_until.md b/docs/commands/skip_until.md
index 711d93564..7d3545dd5 100644
--- a/docs/commands/skip_until.md
+++ b/docs/commands/skip_until.md
@@ -20,4 +20,3 @@ Skip until the element is positive
```shell
> echo [-2 0 2 -1] | skip until $it > 0
```
-
diff --git a/docs/commands/skip_while.md b/docs/commands/skip_while.md
index 8a3c1d65d..9fed5b0dc 100644
--- a/docs/commands/skip_while.md
+++ b/docs/commands/skip_while.md
@@ -20,4 +20,3 @@ Skip while the element is negative
```shell
> echo [-2 0 2 -1] | skip while $it < 0
```
-
diff --git a/docs/commands/sleep.md b/docs/commands/sleep.md
index 1aaa6a79e..84f65c40b 100644
--- a/docs/commands/sleep.md
+++ b/docs/commands/sleep.md
@@ -31,4 +31,3 @@ Send output after 1sec
```shell
> sleep 1sec; echo done
```
-
diff --git a/docs/commands/sort-by.md b/docs/commands/sort-by.md
index de74addf6..e7fc0a575 100644
--- a/docs/commands/sort-by.md
+++ b/docs/commands/sort-by.md
@@ -47,4 +47,3 @@ Sort strings (reversed case-insensitive)
```shell
> echo [airplane Truck Car] | sort-by -i -r
```
-
diff --git a/docs/commands/source.md b/docs/commands/source.md
index 4ce9c438c..96dc47d5c 100644
--- a/docs/commands/source.md
+++ b/docs/commands/source.md
@@ -14,3 +14,19 @@ Runs a script file in the current context.
- `filename`: the filepath to the script file to source
+## Examples
+
+Runs foo.nu in the current context
+```shell
+> source foo.nu
+```
+
+Runs foo.nu in current context and call the command defined, suppose foo.nu has content: `def say-hi [] { echo 'Hi!' }`
+```shell
+> source ./foo.nu; say-hi
+```
+
+Runs foo.nu in current context and call the `main` command automatically, suppose foo.nu has content: `def main [] { echo 'Hi!' }`
+```shell
+> source ./foo.nu
+```
diff --git a/docs/commands/split-by.md b/docs/commands/split-by.md
index 3c9533934..8303343c7 100644
--- a/docs/commands/split-by.md
+++ b/docs/commands/split-by.md
@@ -18,7 +18,7 @@ Create a new table splitted.
split items by column named "lang"
```shell
->
+>
{
'2019': [
{ name: 'andres', lang: 'rb', year: '2019' },
@@ -28,6 +28,5 @@ split items by column named "lang"
{ name: 'storm', lang: 'rs', 'year': '2021' }
]
} | split-by lang
-
+
```
-
diff --git a/docs/commands/split.md b/docs/commands/split.md
index c8816f8cb..1cbd152df 100644
--- a/docs/commands/split.md
+++ b/docs/commands/split.md
@@ -9,4 +9,3 @@ Split contents across desired subcommand (like row, column) via the separator.
## Signature
```> split ```
-
diff --git a/docs/commands/split_chars.md b/docs/commands/split_chars.md
index d8b755a75..b580cca2c 100644
--- a/docs/commands/split_chars.md
+++ b/docs/commands/split_chars.md
@@ -16,4 +16,3 @@ Split the string's characters into separate rows
```shell
> 'hello' | split chars
```
-
diff --git a/docs/commands/split_column.md b/docs/commands/split_column.md
index c535b7b9a..b19905b45 100644
--- a/docs/commands/split_column.md
+++ b/docs/commands/split_column.md
@@ -27,4 +27,3 @@ Split a string into columns of char and remove the empty columns
```shell
> echo 'abc' | split column -c ''
```
-
diff --git a/docs/commands/split_row.md b/docs/commands/split_row.md
index 9ccba2eaf..3f61a2ed8 100644
--- a/docs/commands/split_row.md
+++ b/docs/commands/split_row.md
@@ -25,4 +25,3 @@ Split a string into rows by the specified separator
```shell
> echo 'a--b--c' | split row '--'
```
-
diff --git a/docs/commands/str.md b/docs/commands/str.md
index 55fc906d2..4d7cc8d13 100644
--- a/docs/commands/str.md
+++ b/docs/commands/str.md
@@ -9,4 +9,3 @@ Various commands for working with string data.
## Signature
```> str ```
-
diff --git a/docs/commands/str_camel-case.md b/docs/commands/str_camel-case.md
index 441ceb0e0..48b1d34e5 100644
--- a/docs/commands/str_camel-case.md
+++ b/docs/commands/str_camel-case.md
@@ -35,4 +35,3 @@ convert a column from a table to camelCase
```shell
> [[lang, gems]; [nu_test, 100]] | str camel-case lang
```
-
diff --git a/docs/commands/str_capitalize.md b/docs/commands/str_capitalize.md
index 76bc30763..76d7ce1ec 100644
--- a/docs/commands/str_capitalize.md
+++ b/docs/commands/str_capitalize.md
@@ -30,4 +30,3 @@ Capitalize a column in a table
```shell
> [[lang, gems]; [nu_test, 100]] | str capitalize lang
```
-
diff --git a/docs/commands/str_collect.md b/docs/commands/str_collect.md
index d36303e5a..a46d4fe9d 100644
--- a/docs/commands/str_collect.md
+++ b/docs/commands/str_collect.md
@@ -25,4 +25,3 @@ Create a string from input with a separator
```shell
> ['nu', 'shell'] | str collect '-'
```
-
diff --git a/docs/commands/str_contains.md b/docs/commands/str_contains.md
index 38ec794db..b07a69faf 100644
--- a/docs/commands/str_contains.md
+++ b/docs/commands/str_contains.md
@@ -47,4 +47,3 @@ Check if string contains pattern
```shell
> 'hello' | str contains 'banana'
```
-
diff --git a/docs/commands/str_downcase.md b/docs/commands/str_downcase.md
index 37b136cda..329c84a7c 100644
--- a/docs/commands/str_downcase.md
+++ b/docs/commands/str_downcase.md
@@ -35,4 +35,3 @@ Downcase contents
```shell
> [[ColA ColB]; [Test ABC]] | str downcase ColA ColB
```
-
diff --git a/docs/commands/str_ends-with.md b/docs/commands/str_ends-with.md
index 2624a53cb..3b30bc696 100644
--- a/docs/commands/str_ends-with.md
+++ b/docs/commands/str_ends-with.md
@@ -26,4 +26,3 @@ Checks if string ends with '.txt' pattern
```shell
> 'my_library.rb' | str ends-with '.txt'
```
-
diff --git a/docs/commands/str_find-replace.md b/docs/commands/str_find-replace.md
index 5ec8de2f1..15784fea4 100644
--- a/docs/commands/str_find-replace.md
+++ b/docs/commands/str_find-replace.md
@@ -33,4 +33,3 @@ Find and replace all occurrences of find string in table
```shell
> [[ColA ColB ColC]; [abc abc ads]] | str find-replace -a 'b' 'z' ColA ColC
```
-
diff --git a/docs/commands/str_index-of.md b/docs/commands/str_index-of.md
index 4a359d60b..4358bf825 100644
--- a/docs/commands/str_index-of.md
+++ b/docs/commands/str_index-of.md
@@ -48,4 +48,3 @@ Returns index of pattern in string
```shell
> '/this/is/some/path/file.txt' | str index-of '/' -e
```
-
diff --git a/docs/commands/str_kebab-case.md b/docs/commands/str_kebab-case.md
index 10bb15fdd..9a29f97a5 100644
--- a/docs/commands/str_kebab-case.md
+++ b/docs/commands/str_kebab-case.md
@@ -35,4 +35,3 @@ convert a column from a table to kebab-case
```shell
> [[lang, gems]; [nuTest, 100]] | str kebab-case lang
```
-
diff --git a/docs/commands/str_length.md b/docs/commands/str_length.md
index eed64053e..d0ff21e1a 100644
--- a/docs/commands/str_length.md
+++ b/docs/commands/str_length.md
@@ -25,4 +25,3 @@ Return the lengths of multiple strings
```shell
> ['hi' 'there'] | str length
```
-
diff --git a/docs/commands/str_lpad.md b/docs/commands/str_lpad.md
index 179a6d6bf..367b6c743 100644
--- a/docs/commands/str_lpad.md
+++ b/docs/commands/str_lpad.md
@@ -37,4 +37,3 @@ Use lpad to pad Unicode
```shell
> '▉' | str lpad -l 10 -c '▉'
```
-
diff --git a/docs/commands/str_pascal-case.md b/docs/commands/str_pascal-case.md
index 0d4f63c99..4d7909c55 100644
--- a/docs/commands/str_pascal-case.md
+++ b/docs/commands/str_pascal-case.md
@@ -35,4 +35,3 @@ convert a column from a table to PascalCase
```shell
> [[lang, gems]; [nu_test, 100]] | str pascal-case lang
```
-
diff --git a/docs/commands/str_reverse.md b/docs/commands/str_reverse.md
index 1f0233d97..09a322e57 100644
--- a/docs/commands/str_reverse.md
+++ b/docs/commands/str_reverse.md
@@ -20,4 +20,3 @@ Return the reversals of multiple strings
```shell
> 'Nushell' | str reverse
```
-
diff --git a/docs/commands/str_rpad.md b/docs/commands/str_rpad.md
index 4e63eb93e..baefe1a1b 100644
--- a/docs/commands/str_rpad.md
+++ b/docs/commands/str_rpad.md
@@ -37,4 +37,3 @@ Use rpad to pad Unicode
```shell
> '▉' | str rpad -l 10 -c '▉'
```
-
diff --git a/docs/commands/str_screaming-snake-case.md b/docs/commands/str_screaming-snake-case.md
index 9b76d5195..2a1b1d724 100644
--- a/docs/commands/str_screaming-snake-case.md
+++ b/docs/commands/str_screaming-snake-case.md
@@ -35,4 +35,3 @@ convert a column from a table to SCREAMING_SNAKE_CASE
```shell
> [[lang, gems]; [nu_test, 100]] | str screaming-snake-case lang
```
-
diff --git a/docs/commands/str_snake-case.md b/docs/commands/str_snake-case.md
index 18ffe134c..6af782bc8 100644
--- a/docs/commands/str_snake-case.md
+++ b/docs/commands/str_snake-case.md
@@ -35,4 +35,3 @@ convert a column from a table to snake-case
```shell
> [[lang, gems]; [nuTest, 100]] | str snake-case lang
```
-
diff --git a/docs/commands/str_starts-with.md b/docs/commands/str_starts-with.md
index a8a1c0688..08796c3a6 100644
--- a/docs/commands/str_starts-with.md
+++ b/docs/commands/str_starts-with.md
@@ -31,4 +31,3 @@ Checks if string starts with 'my' pattern
```shell
> 'Cargo.toml' | str starts-with '.toml'
```
-
diff --git a/docs/commands/str_substring.md b/docs/commands/str_substring.md
index 753524417..aa1d777af 100644
--- a/docs/commands/str_substring.md
+++ b/docs/commands/str_substring.md
@@ -41,4 +41,3 @@ Get the characters from the beginning until ending index
```shell
> 'good nushell' | str substring ',7'
```
-
diff --git a/docs/commands/str_to-datetime.md b/docs/commands/str_to-datetime.md
index 0299d76ac..f178576d0 100644
--- a/docs/commands/str_to-datetime.md
+++ b/docs/commands/str_to-datetime.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> str to-datetime ```
-
diff --git a/docs/commands/str_to-decimal.md b/docs/commands/str_to-decimal.md
index d923d0ca7..b8bf13c0e 100644
--- a/docs/commands/str_to-decimal.md
+++ b/docs/commands/str_to-decimal.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> str to-decimal ```
-
diff --git a/docs/commands/str_to-int.md b/docs/commands/str_to-int.md
index a5087b60b..71351a983 100644
--- a/docs/commands/str_to-int.md
+++ b/docs/commands/str_to-int.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> str to-int ```
-
diff --git a/docs/commands/str_trim.md b/docs/commands/str_trim.md
index 5d2706819..aae19a5c1 100644
--- a/docs/commands/str_trim.md
+++ b/docs/commands/str_trim.md
@@ -56,4 +56,3 @@ Trim a specific character
```shell
> '=== Nu shell ===' | str trim -r -c '='
```
-
diff --git a/docs/commands/str_upcase.md b/docs/commands/str_upcase.md
index 6f61dc24d..59981dab8 100644
--- a/docs/commands/str_upcase.md
+++ b/docs/commands/str_upcase.md
@@ -20,4 +20,3 @@ Upcase contents
```shell
> 'nu' | str upcase
```
-
diff --git a/docs/commands/sys.md b/docs/commands/sys.md
index 22cb930d4..775836eec 100644
--- a/docs/commands/sys.md
+++ b/docs/commands/sys.md
@@ -26,4 +26,3 @@ Show the os system name
```shell
> (sys).host.name
```
-
diff --git a/docs/commands/table.md b/docs/commands/table.md
index f9ff3c48e..cb7d952d4 100644
--- a/docs/commands/table.md
+++ b/docs/commands/table.md
@@ -14,3 +14,14 @@ Render the table.
- `--start-number {int}`: row number to start viewing from
+## Examples
+
+List the files in current directory with index number start from 1.
+```shell
+> ls | table -n 1
+```
+
+Render data in table view
+```shell
+> echo [[a b]; [1 2] [3 4]] | table
+```
diff --git a/docs/commands/term_size.md b/docs/commands/term_size.md
index 7ae038971..0cd746bd9 100644
--- a/docs/commands/term_size.md
+++ b/docs/commands/term_size.md
@@ -31,4 +31,3 @@ Return the height (rows) of the terminal
```shell
> term size -r
```
-
diff --git a/docs/commands/to.md b/docs/commands/to.md
index 5bd21bc0e..e6cf0f466 100644
--- a/docs/commands/to.md
+++ b/docs/commands/to.md
@@ -9,4 +9,3 @@ Translate structured data to a format
## Signature
```> to ```
-
diff --git a/docs/commands/to_csv.md b/docs/commands/to_csv.md
index 6b8330cbf..964d4ca4c 100644
--- a/docs/commands/to_csv.md
+++ b/docs/commands/to_csv.md
@@ -4,7 +4,7 @@ layout: command
version: 0.59.0
---
-Convert table into .csv text
+Convert table into .csv text
## Signature
@@ -24,6 +24,5 @@ Outputs an CSV string representing the contents of this table
Outputs an CSV string representing the contents of this table
```shell
-> [[foo bar]; [1 2]] | to csv -s ';'
+> [[foo bar]; [1 2]] | to csv -s ';'
```
-
diff --git a/docs/commands/to_html.md b/docs/commands/to_html.md
index bdb2adc32..fce7360ee 100644
--- a/docs/commands/to_html.md
+++ b/docs/commands/to_html.md
@@ -35,4 +35,3 @@ Optionally, output the string with a dark background
```shell
> [[foo bar]; [1 2]] | to html --dark
```
-
diff --git a/docs/commands/to_json.md b/docs/commands/to_json.md
index 00467a3d7..1ac5a1df5 100644
--- a/docs/commands/to_json.md
+++ b/docs/commands/to_json.md
@@ -8,16 +8,26 @@ Converts table data into JSON text.
## Signature
-```> to json --raw```
+```> to json --raw --indent```
## Parameters
- `--raw`: remove all of the whitespace
+ - `--indent {number}`: specify indentation width
## Examples
-Outputs an unformatted JSON string representing the contents of this table
+Outputs a JSON string, with default indentation, representing the contents of this table
```shell
-> [1 2 3] | to json
+> [a b c] | to json
```
+Outputs a JSON string, with 4-space indentation, representing the contents of this table
+```shell
+> [Joe Bob Sam] | to json -i 4
+```
+
+Outputs an unformatted JSON string representing the contents of this table
+```shell
+> [1 2 3] | to json -r
+```
diff --git a/docs/commands/to_md.md b/docs/commands/to_md.md
index 1541c1a68..efcb3aebf 100644
--- a/docs/commands/to_md.md
+++ b/docs/commands/to_md.md
@@ -31,4 +31,3 @@ Treat each row as a markdown element
```shell
> [{"H1": "Welcome to Nushell" } [[foo bar]; [1 2]]] | to md --per-element --pretty
```
-
diff --git a/docs/commands/to_nuon.md b/docs/commands/to_nuon.md
new file mode 100644
index 000000000..f5ed6198d
--- /dev/null
+++ b/docs/commands/to_nuon.md
@@ -0,0 +1,18 @@
+---
+title: to nuon
+layout: command
+version: 0.59.0
+---
+
+Converts table data into Nuon (Nushell Object Notation) text.
+
+## Signature
+
+```> to nuon ```
+
+## Examples
+
+Outputs a nuon string representing the contents of this table
+```shell
+> [1 2 3] | to nuon
+```
diff --git a/docs/commands/to_toml.md b/docs/commands/to_toml.md
index aeef432b2..4bf86bf8f 100644
--- a/docs/commands/to_toml.md
+++ b/docs/commands/to_toml.md
@@ -16,4 +16,3 @@ Outputs an TOML string representing the contents of this table
```shell
> [[foo bar]; ["1" "2"]] | to toml
```
-
diff --git a/docs/commands/to_tsv.md b/docs/commands/to_tsv.md
index 49dcc73c0..32deab812 100644
--- a/docs/commands/to_tsv.md
+++ b/docs/commands/to_tsv.md
@@ -20,4 +20,3 @@ Outputs an TSV string representing the contents of this table
```shell
> [[foo bar]; [1 2]] | to tsv
```
-
diff --git a/docs/commands/to_url.md b/docs/commands/to_url.md
index 087be8c37..2f4bca1d7 100644
--- a/docs/commands/to_url.md
+++ b/docs/commands/to_url.md
@@ -16,4 +16,3 @@ Outputs an URL string representing the contents of this table
```shell
> [[foo bar]; ["1" "2"]] | to url
```
-
diff --git a/docs/commands/to_xml.md b/docs/commands/to_xml.md
index 797ed0c47..bc9fe586b 100644
--- a/docs/commands/to_xml.md
+++ b/docs/commands/to_xml.md
@@ -25,4 +25,3 @@ Optionally, formats the text with a custom indentation setting
```shell
> { "note": { "children": [{ "remember": {"attributes" : {}, "children": [Event]}}], "attributes": {} } } | to xml -p 3
```
-
diff --git a/docs/commands/to_yaml.md b/docs/commands/to_yaml.md
index 76d6c7ad7..c5bb0b79f 100644
--- a/docs/commands/to_yaml.md
+++ b/docs/commands/to_yaml.md
@@ -16,4 +16,3 @@ Outputs an YAML string representing the contents of this table
```shell
> [[foo bar]; ["1" "2"]] | to yaml
```
-
diff --git a/docs/commands/touch.md b/docs/commands/touch.md
index 4cbe39860..65371bd73 100644
--- a/docs/commands/touch.md
+++ b/docs/commands/touch.md
@@ -26,4 +26,3 @@ Creates files a, b and c
```shell
> touch a b c
```
-
diff --git a/docs/commands/transpose.md b/docs/commands/transpose.md
index 14073f69c..0885c73be 100644
--- a/docs/commands/transpose.md
+++ b/docs/commands/transpose.md
@@ -32,4 +32,3 @@ Transposes the table without column names and specify a new column name
```shell
> echo [[c1 c2]; [1 2]] | transpose -i val
```
-
diff --git a/docs/commands/tutor.md b/docs/commands/tutor.md
index a08ebdb4d..938c13b0a 100644
--- a/docs/commands/tutor.md
+++ b/docs/commands/tutor.md
@@ -26,4 +26,3 @@ Search a tutorial by phrase
```shell
> tutor -f "$in"
```
-
diff --git a/docs/commands/unalias.md b/docs/commands/unalias.md
index 8c4d975fd..27db2630d 100644
--- a/docs/commands/unalias.md
+++ b/docs/commands/unalias.md
@@ -9,4 +9,3 @@ Deprecated command
## Signature
```> unalias ```
-
diff --git a/docs/commands/uniq.md b/docs/commands/uniq.md
index 8f847fa0c..988aad055 100644
--- a/docs/commands/uniq.md
+++ b/docs/commands/uniq.md
@@ -43,4 +43,3 @@ Remove duplicate rows and show counts of a list/table
```shell
> [1 2 2] | uniq -c
```
-
diff --git a/docs/commands/update.md b/docs/commands/update.md
index 3d2117465..961a8285d 100644
--- a/docs/commands/update.md
+++ b/docs/commands/update.md
@@ -31,4 +31,3 @@ Use in block form for more involved updating logic
```shell
> echo [[project, authors]; ['nu', ['Andrés', 'JT', 'Yehuda']]] | update authors { get authors | str collect ',' }
```
-
diff --git a/docs/commands/update_cells.md b/docs/commands/update_cells.md
index 54fd08611..3dd946d8f 100644
--- a/docs/commands/update_cells.md
+++ b/docs/commands/update_cells.md
@@ -44,4 +44,3 @@ Update the zero value cells to empty strings in 2 last columns.
}
}
```
-
diff --git a/docs/commands/url.md b/docs/commands/url.md
index 4e2d26aff..c915c9251 100644
--- a/docs/commands/url.md
+++ b/docs/commands/url.md
@@ -9,4 +9,3 @@ Apply url function.
## Signature
```> url ```
-
diff --git a/docs/commands/url_host.md b/docs/commands/url_host.md
index 11fc3e0ee..b40cb3a35 100644
--- a/docs/commands/url_host.md
+++ b/docs/commands/url_host.md
@@ -20,4 +20,3 @@ Get host of a url
```shell
> echo 'http://www.example.com/foo/bar' | url host
```
-
diff --git a/docs/commands/url_path.md b/docs/commands/url_path.md
index 3e0a031c5..a8889b5a5 100644
--- a/docs/commands/url_path.md
+++ b/docs/commands/url_path.md
@@ -25,4 +25,3 @@ A trailing slash will be reflected in the path
```shell
> echo 'http://www.example.com' | url path
```
-
diff --git a/docs/commands/url_query.md b/docs/commands/url_query.md
index c10da296c..dbeb3216f 100644
--- a/docs/commands/url_query.md
+++ b/docs/commands/url_query.md
@@ -25,4 +25,3 @@ No query gives the empty string
```shell
> echo 'http://www.example.com/' | url query
```
-
diff --git a/docs/commands/url_scheme.md b/docs/commands/url_scheme.md
index 27f04cfb2..6210c0402 100644
--- a/docs/commands/url_scheme.md
+++ b/docs/commands/url_scheme.md
@@ -25,4 +25,3 @@ You get an empty string if there is no scheme
```shell
> echo 'test' | url scheme
```
-
diff --git a/docs/commands/use.md b/docs/commands/use.md
index 922d6fe88..5106877e2 100644
--- a/docs/commands/use.md
+++ b/docs/commands/use.md
@@ -14,3 +14,19 @@ Use definitions from a module
- `pattern`: import pattern
+## Examples
+
+Define a custom command in a module and call it
+```shell
+> module spam { export def foo [] { "foo" } }; use spam foo; foo
+```
+
+Define an environment variable in a module and evaluate it
+```shell
+> module foo { export env FOO_ENV { "BAZ" } }; use foo FOO_ENV; $env.FOO_ENV
+```
+
+Define a custom command that participates in the environment in a module and call it
+```shell
+> module foo { export def-env bar [] { let-env FOO_BAR = "BAZ" } }; use foo bar; bar; $env.FOO_BAR
+```
diff --git a/docs/commands/version.md b/docs/commands/version.md
index e74b2f618..d508caad9 100644
--- a/docs/commands/version.md
+++ b/docs/commands/version.md
@@ -16,4 +16,3 @@ Display Nu version
```shell
> version
```
-
diff --git a/docs/commands/view-source.md b/docs/commands/view-source.md
index b4facc8b7..431adbc59 100644
--- a/docs/commands/view-source.md
+++ b/docs/commands/view-source.md
@@ -13,4 +13,3 @@ View a block, module, or a definition
## Parameters
- `item`: name or block to view
-
diff --git a/docs/commands/where.md b/docs/commands/where.md
index b3aece414..a7f3bf4b1 100644
--- a/docs/commands/where.md
+++ b/docs/commands/where.md
@@ -35,4 +35,3 @@ List all files that were modified in the last two weeks
```shell
> ls | where modified <= 2wk
```
-
diff --git a/docs/commands/which.md b/docs/commands/which.md
index af1ff377c..152ecb7f6 100644
--- a/docs/commands/which.md
+++ b/docs/commands/which.md
@@ -22,4 +22,3 @@ Find if the 'myapp' application is available
```shell
> which myapp
```
-
diff --git a/docs/commands/with-env.md b/docs/commands/with-env.md
index 183ac4230..65d7b64ba 100644
--- a/docs/commands/with-env.md
+++ b/docs/commands/with-env.md
@@ -36,4 +36,3 @@ Set by row(e.g. `open x.json` or `from json`)
```shell
> echo '{"X":"Y","W":"Z"}'|from json|with-env $in { echo $env.X $env.W }
```
-
diff --git a/docs/commands/wrap.md b/docs/commands/wrap.md
index c2d02c0c3..77d4b1523 100644
--- a/docs/commands/wrap.md
+++ b/docs/commands/wrap.md
@@ -20,4 +20,3 @@ Wrap a list into a table with a given column name
```shell
> echo [1 2 3] | wrap num
```
-
diff --git a/docs/commands/zip.md b/docs/commands/zip.md
index f47b72789..17aab3a1c 100644
--- a/docs/commands/zip.md
+++ b/docs/commands/zip.md
@@ -20,4 +20,3 @@ Zip multiple streams and get one of the results
```shell
> 1..3 | zip 4..6
```
-
diff --git a/docs/make_docs.nu b/docs/make_docs.nu
index e4a7066eb..3fb5bd845 100644
--- a/docs/make_docs.nu
+++ b/docs/make_docs.nu
@@ -1,6 +1,6 @@
let vers = (version).version
-for command in ($scope.commands | where is_custom == $false && is_external == $false) {
+for command in ($scope.commands | where is_custom == $false && is_extern == $false) {
let top = $"---
title: ($command.command)
layout: command
@@ -57,7 +57,9 @@ $"($example.description)
$example_top + $examples
} else { "" }
- let doc = ($top + $signature + $parameters + $examples)
+ let doc = (($top + $signature + $parameters + $examples) |
+ each {|it| ($it | str trim -r)} |
+ str collect (char nl)) + (char nl)
let safe_name = ($command.command | str find-replace '\?' '' | str find-replace ' ' '_')
$doc | save --raw $"./docs/commands/($safe_name).md"