diff --git a/commands/docs/abbr.md b/commands/docs/abbr.md index 0a7e9df603b..a1e299c438a 100644 --- a/commands/docs/abbr.md +++ b/commands/docs/abbr.md @@ -2,7 +2,7 @@ title: abbr categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Abbreviations related commands. usage: | diff --git a/commands/docs/abbr_list.md b/commands/docs/abbr_list.md index 2b55b835941..3d9f0f4ab66 100644 --- a/commands/docs/abbr_list.md +++ b/commands/docs/abbr_list.md @@ -2,7 +2,7 @@ title: abbr list categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | List all defined abbreviations. usage: | diff --git a/commands/docs/alias.md b/commands/docs/alias.md index cf8b9c97c14..caae4682831 100644 --- a/commands/docs/alias.md +++ b/commands/docs/alias.md @@ -2,7 +2,7 @@ title: alias categories: | core -version: 0.113.0 +version: 0.114.0 core: | Alias a command (with optional flags) to a new name. usage: | diff --git a/commands/docs/all.md b/commands/docs/all.md index 94bcc8d3c2c..a6fbf0d514b 100644 --- a/commands/docs/all.md +++ b/commands/docs/all.md @@ -2,7 +2,7 @@ title: all categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Test if every element of the input fulfills a predicate expression. usage: | diff --git a/commands/docs/ansi.md b/commands/docs/ansi.md index d62b57e3e8e..a84b5db354d 100644 --- a/commands/docs/ansi.md +++ b/commands/docs/ansi.md @@ -2,7 +2,7 @@ title: ansi categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Output ANSI codes to change color and style of text. usage: | diff --git a/commands/docs/ansi_gradient.md b/commands/docs/ansi_gradient.md index b704d749289..328305d2233 100644 --- a/commands/docs/ansi_gradient.md +++ b/commands/docs/ansi_gradient.md @@ -2,7 +2,7 @@ title: ansi gradient categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Add a color gradient (using ANSI color codes) to the given string. usage: | diff --git a/commands/docs/ansi_link.md b/commands/docs/ansi_link.md index 9902a2d08f3..298f24e901b 100644 --- a/commands/docs/ansi_link.md +++ b/commands/docs/ansi_link.md @@ -2,7 +2,7 @@ title: ansi link categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Add a link (using OSC 8 escape sequence) to the given string. usage: | diff --git a/commands/docs/ansi_strip.md b/commands/docs/ansi_strip.md index b40f8b51c1f..4e0596a968c 100644 --- a/commands/docs/ansi_strip.md +++ b/commands/docs/ansi_strip.md @@ -2,7 +2,7 @@ title: ansi strip categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Strip ANSI escape sequences from a string. usage: | diff --git a/commands/docs/any.md b/commands/docs/any.md index 1bfe8a5b2df..68dcd4ecbad 100644 --- a/commands/docs/any.md +++ b/commands/docs/any.md @@ -2,7 +2,7 @@ title: any categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Tests if any element of the input fulfills a predicate expression. usage: | diff --git a/commands/docs/append.md b/commands/docs/append.md index 606ffc02f2a..ad8458fc301 100644 --- a/commands/docs/append.md +++ b/commands/docs/append.md @@ -2,7 +2,7 @@ title: append categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Append any number of rows to a table. usage: | @@ -18,11 +18,12 @@ contributors: false ## Signature -```> append {flags} (row)``` +```> append {flags} (row) ...rest``` ## Parameters - `row`: The row, list, or table to append. + - `...rest`: Additional values to append. ## Input/output types: @@ -67,19 +68,6 @@ Append a list of string to a string. ``` -Append three int items. -```nu -> [0 1] | append [2 3 4] -╭───┬───╮ -│ 0 │ 0 │ -│ 1 │ 1 │ -│ 2 │ 2 │ -│ 3 │ 3 │ -│ 4 │ 4 │ -╰───┴───╯ - -``` - Append ints and strings. ```nu > [0 1] | append [2 nu 4 shell] @@ -107,6 +95,19 @@ Append a range of ints to a list. ``` +Append multiple lists and values. +```nu +> [0] | append [1 2] [3] [] 4 +╭───┬───╮ +│ 0 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 2 │ +│ 3 │ 3 │ +│ 4 │ 4 │ +╰───┴───╯ + +``` + ## Notes Be aware that this command 'unwraps' lists passed to it. So, if you pass a variable to it, and you want the variable's contents to be appended without being unwrapped, it's wise to diff --git a/commands/docs/ast.md b/commands/docs/ast.md index f72304a9e59..4716ba7f91f 100644 --- a/commands/docs/ast.md +++ b/commands/docs/ast.md @@ -2,7 +2,7 @@ title: ast categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Print the abstract syntax tree (ast) for a pipeline. usage: | diff --git a/commands/docs/attr.md b/commands/docs/attr.md index a50443aacdd..6ea81930948 100644 --- a/commands/docs/attr.md +++ b/commands/docs/attr.md @@ -2,7 +2,7 @@ title: attr categories: | core -version: 0.113.0 +version: 0.114.0 core: | Various attributes for custom commands. usage: | diff --git a/commands/docs/attr_category.md b/commands/docs/attr_category.md index b8ed749ca03..b93f28dd8ff 100644 --- a/commands/docs/attr_category.md +++ b/commands/docs/attr_category.md @@ -2,7 +2,7 @@ title: attr category categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for adding a category to custom commands. usage: | diff --git a/commands/docs/attr_complete.md b/commands/docs/attr_complete.md index bcddcca4655..82b2b45b13f 100644 --- a/commands/docs/attr_complete.md +++ b/commands/docs/attr_complete.md @@ -2,7 +2,7 @@ title: attr complete categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for using another command as a completion source for all arguments. usage: | diff --git a/commands/docs/attr_complete_external.md b/commands/docs/attr_complete_external.md index 76cae4d4d8b..a7d5fb403a8 100644 --- a/commands/docs/attr_complete_external.md +++ b/commands/docs/attr_complete_external.md @@ -2,7 +2,7 @@ title: attr complete external categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for enabling use of the external completer for internal commands. usage: | diff --git a/commands/docs/attr_deprecated.md b/commands/docs/attr_deprecated.md index afa7bbdb751..f7f715f9736 100644 --- a/commands/docs/attr_deprecated.md +++ b/commands/docs/attr_deprecated.md @@ -2,7 +2,7 @@ title: attr deprecated categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for marking a command or flag as deprecated. usage: | diff --git a/commands/docs/attr_example.md b/commands/docs/attr_example.md index 51af82242c7..1941328c939 100644 --- a/commands/docs/attr_example.md +++ b/commands/docs/attr_example.md @@ -2,7 +2,7 @@ title: attr example categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for adding examples to custom commands. usage: | diff --git a/commands/docs/attr_search-terms.md b/commands/docs/attr_search-terms.md index 2784d463d02..1ee9dfbcaa9 100644 --- a/commands/docs/attr_search-terms.md +++ b/commands/docs/attr_search-terms.md @@ -2,7 +2,7 @@ title: attr search-terms categories: | core -version: 0.113.0 +version: 0.114.0 core: | Attribute for adding search terms to custom commands. usage: | diff --git a/commands/docs/banner.md b/commands/docs/banner.md index b75c2cc2653..07b0bea1358 100644 --- a/commands/docs/banner.md +++ b/commands/docs/banner.md @@ -2,7 +2,7 @@ title: banner categories: | default -version: 0.113.0 +version: 0.114.0 default: | Print a banner for Nushell with information about the project usage: | diff --git a/commands/docs/bits.md b/commands/docs/bits.md index 09982547992..546fb76a956 100644 --- a/commands/docs/bits.md +++ b/commands/docs/bits.md @@ -2,7 +2,7 @@ title: bits categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Various commands for working with bits. usage: | diff --git a/commands/docs/bits_and.md b/commands/docs/bits_and.md index 7c21b957558..f2fb0b34f12 100644 --- a/commands/docs/bits_and.md +++ b/commands/docs/bits_and.md @@ -2,7 +2,7 @@ title: bits and categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Performs bitwise and for ints or binary values. usage: | diff --git a/commands/docs/bits_not.md b/commands/docs/bits_not.md index 3ee41ec647b..898ee63be62 100644 --- a/commands/docs/bits_not.md +++ b/commands/docs/bits_not.md @@ -2,7 +2,7 @@ title: bits not categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Performs logical negation on each bit. usage: | diff --git a/commands/docs/bits_or.md b/commands/docs/bits_or.md index 193808c6453..28d0e8fa194 100644 --- a/commands/docs/bits_or.md +++ b/commands/docs/bits_or.md @@ -2,7 +2,7 @@ title: bits or categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Performs bitwise or for ints or binary values. usage: | diff --git a/commands/docs/bits_rol.md b/commands/docs/bits_rol.md index 7a30e8d006d..6d6f54d700a 100644 --- a/commands/docs/bits_rol.md +++ b/commands/docs/bits_rol.md @@ -2,7 +2,7 @@ title: bits rol categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Bitwise rotate left for ints or binary values. usage: | diff --git a/commands/docs/bits_ror.md b/commands/docs/bits_ror.md index 34c71232d6f..85f478e617f 100644 --- a/commands/docs/bits_ror.md +++ b/commands/docs/bits_ror.md @@ -2,7 +2,7 @@ title: bits ror categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Bitwise rotate right for ints or binary values. usage: | diff --git a/commands/docs/bits_shl.md b/commands/docs/bits_shl.md index 23a068e296f..ae3bc13b57d 100644 --- a/commands/docs/bits_shl.md +++ b/commands/docs/bits_shl.md @@ -2,7 +2,7 @@ title: bits shl categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Bitwise shift left for ints or binary values. usage: | @@ -23,7 +23,7 @@ contributors: false ## Flags - `--signed, -s`: Always treat input number as a signed number. - - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to `8`). ## Parameters @@ -43,7 +43,7 @@ contributors: false Shift left a number by 7 bits ```nu > 2 | bits shl 7 -0 +256 ``` Shift left a number with 2 byte by 7 bits @@ -54,7 +54,7 @@ Shift left a number with 2 byte by 7 bits Shift left a signed number by 1 bit ```nu -> 0x7F | bits shl 1 --signed +> 0x7F | bits shl 1 --signed --number-bytes 1 -2 ``` diff --git a/commands/docs/bits_shr.md b/commands/docs/bits_shr.md index ae9aa386300..47ac012528d 100644 --- a/commands/docs/bits_shr.md +++ b/commands/docs/bits_shr.md @@ -2,7 +2,7 @@ title: bits shr categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Bitwise shift right for ints or binary values. usage: | @@ -23,7 +23,7 @@ contributors: false ## Flags - `--signed, -s`: Always treat input number as a signed number. - - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to the smallest of those that fits the input number). + - `--number-bytes, -n {int}`: The word size in number of bytes. Must be `1`, `2`, `4`, or `8` (defaults to `8`). ## Parameters diff --git a/commands/docs/bits_xor.md b/commands/docs/bits_xor.md index a21028c504b..96fda2ee789 100644 --- a/commands/docs/bits_xor.md +++ b/commands/docs/bits_xor.md @@ -2,7 +2,7 @@ title: bits xor categories: | bits -version: 0.113.0 +version: 0.114.0 bits: | Performs bitwise xor for ints or binary values. usage: | diff --git a/commands/docs/break.md b/commands/docs/break.md index 489c40968d3..4c5aa3b4d45 100644 --- a/commands/docs/break.md +++ b/commands/docs/break.md @@ -2,7 +2,7 @@ title: break categories: | core -version: 0.113.0 +version: 0.114.0 core: | Break a loop. usage: | diff --git a/commands/docs/bytes.md b/commands/docs/bytes.md index 3037e64e5b7..aead3c92a6f 100644 --- a/commands/docs/bytes.md +++ b/commands/docs/bytes.md @@ -2,7 +2,7 @@ title: bytes categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Various commands for working with byte data. usage: | diff --git a/commands/docs/bytes_add.md b/commands/docs/bytes_add.md index f3d45f53077..52098536988 100644 --- a/commands/docs/bytes_add.md +++ b/commands/docs/bytes_add.md @@ -2,7 +2,7 @@ title: bytes add categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Add specified bytes to the binary input. usage: | diff --git a/commands/docs/bytes_at.md b/commands/docs/bytes_at.md index 0dc7dc124e2..6b6ebc1d272 100644 --- a/commands/docs/bytes_at.md +++ b/commands/docs/bytes_at.md @@ -2,7 +2,7 @@ title: bytes at categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Get bytes from the input defined by a range. usage: | diff --git a/commands/docs/bytes_build.md b/commands/docs/bytes_build.md index 995247caf54..e044f67e159 100644 --- a/commands/docs/bytes_build.md +++ b/commands/docs/bytes_build.md @@ -2,7 +2,7 @@ title: bytes build categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Create a binary value from the provided arguments. usage: | diff --git a/commands/docs/bytes_collect.md b/commands/docs/bytes_collect.md index 66eb8496e01..c78be4ee0d0 100644 --- a/commands/docs/bytes_collect.md +++ b/commands/docs/bytes_collect.md @@ -2,7 +2,7 @@ title: bytes collect categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Concatenate multiple binary into a single binary, with an optional separator between each. usage: | diff --git a/commands/docs/bytes_ends-with.md b/commands/docs/bytes_ends-with.md index 825c9a23528..f4f136a97bc 100644 --- a/commands/docs/bytes_ends-with.md +++ b/commands/docs/bytes_ends-with.md @@ -2,7 +2,7 @@ title: bytes ends-with categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Check if binary data ends with a pattern. usage: | diff --git a/commands/docs/bytes_index-of.md b/commands/docs/bytes_index-of.md index 3652db89bd0..9fccd905071 100644 --- a/commands/docs/bytes_index-of.md +++ b/commands/docs/bytes_index-of.md @@ -2,7 +2,7 @@ title: bytes index-of categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Returns start index of first occurrence of pattern in bytes, or -1 if no match. usage: | @@ -22,7 +22,7 @@ contributors: false ## Flags - - `--all, -a`: Returns all matched index. + - `--all, -a`: Returns all matched indices. - `--end, -e`: Search from the end of the binary. ## Parameters diff --git a/commands/docs/bytes_length.md b/commands/docs/bytes_length.md index 081b29999bf..d17c77eec14 100644 --- a/commands/docs/bytes_length.md +++ b/commands/docs/bytes_length.md @@ -2,7 +2,7 @@ title: bytes length categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Output the length of any bytes in the pipeline. usage: | diff --git a/commands/docs/bytes_remove.md b/commands/docs/bytes_remove.md index 8ee66e83b7c..5e38192495b 100644 --- a/commands/docs/bytes_remove.md +++ b/commands/docs/bytes_remove.md @@ -2,7 +2,7 @@ title: bytes remove categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Remove specified bytes from the input. usage: | diff --git a/commands/docs/bytes_replace.md b/commands/docs/bytes_replace.md index 4876e1e513c..ccd085654cd 100644 --- a/commands/docs/bytes_replace.md +++ b/commands/docs/bytes_replace.md @@ -2,7 +2,7 @@ title: bytes replace categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Find and replace bytes in binary data. usage: | diff --git a/commands/docs/bytes_reverse.md b/commands/docs/bytes_reverse.md index 68033abfff7..5660ea29b5e 100644 --- a/commands/docs/bytes_reverse.md +++ b/commands/docs/bytes_reverse.md @@ -2,7 +2,7 @@ title: bytes reverse categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Reverse the bytes in the pipeline. usage: | diff --git a/commands/docs/bytes_split.md b/commands/docs/bytes_split.md index 13de1bbfac9..d9627d32525 100644 --- a/commands/docs/bytes_split.md +++ b/commands/docs/bytes_split.md @@ -2,7 +2,7 @@ title: bytes split categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Split input into multiple items using a separator. usage: | diff --git a/commands/docs/bytes_starts-with.md b/commands/docs/bytes_starts-with.md index 052749e5102..a222b9eb400 100644 --- a/commands/docs/bytes_starts-with.md +++ b/commands/docs/bytes_starts-with.md @@ -2,7 +2,7 @@ title: bytes starts-with categories: | bytes -version: 0.113.0 +version: 0.114.0 bytes: | Check if binary data starts with a pattern. usage: | diff --git a/commands/docs/cal.md b/commands/docs/cal.md index 4cd3eda5927..2e88c523e3c 100644 --- a/commands/docs/cal.md +++ b/commands/docs/cal.md @@ -2,7 +2,7 @@ title: cal categories: | generators -version: 0.113.0 +version: 0.114.0 generators: | Display a calendar. usage: | diff --git a/commands/docs/cd.md b/commands/docs/cd.md index 21adc2ec1b0..a3a6b06cfd6 100644 --- a/commands/docs/cd.md +++ b/commands/docs/cd.md @@ -2,7 +2,7 @@ title: cd categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Change the current working directory. usage: | diff --git a/commands/docs/char.md b/commands/docs/char.md index d1a673c5e1b..f2261c3ce70 100644 --- a/commands/docs/char.md +++ b/commands/docs/char.md @@ -2,7 +2,7 @@ title: char categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Output special characters (e.g., 'newline'). usage: | diff --git a/commands/docs/chunk-by.md b/commands/docs/chunk-by.md index 2cff3cf3860..dec58bf9579 100644 --- a/commands/docs/chunk-by.md +++ b/commands/docs/chunk-by.md @@ -2,7 +2,7 @@ title: chunk-by categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Divides a sequence into sub-sequences based on a closure. usage: | diff --git a/commands/docs/chunks.md b/commands/docs/chunks.md index 54e88600b08..94a444fa1f0 100644 --- a/commands/docs/chunks.md +++ b/commands/docs/chunks.md @@ -2,7 +2,7 @@ title: chunks categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Divide a list, table or binary input into chunks of `chunk_size`. usage: | diff --git a/commands/docs/clear.md b/commands/docs/clear.md index 7c1160d1895..facdbf25c2b 100644 --- a/commands/docs/clear.md +++ b/commands/docs/clear.md @@ -2,7 +2,7 @@ title: clear categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Clear the terminal screen. usage: | diff --git a/commands/docs/collect.md b/commands/docs/collect.md index e1e80c05674..9d472e5b7bd 100644 --- a/commands/docs/collect.md +++ b/commands/docs/collect.md @@ -2,7 +2,7 @@ title: collect categories: | core -version: 0.113.0 +version: 0.114.0 core: | Collect a stream into a value. usage: | diff --git a/commands/docs/columns.md b/commands/docs/columns.md index a56ffe457c8..fcbb72f92db 100644 --- a/commands/docs/columns.md +++ b/commands/docs/columns.md @@ -2,7 +2,7 @@ title: columns categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Given a record or table, produce a list of its columns' names. usage: | diff --git a/commands/docs/combinations.md b/commands/docs/combinations.md new file mode 100644 index 00000000000..b307062a2e4 --- /dev/null +++ b/commands/docs/combinations.md @@ -0,0 +1,95 @@ +--- +title: combinations +categories: | + filters +version: 0.114.0 +filters: | + Generates all combinations of size k from the input list. +usage: | + Generates all combinations of size k from the input list. +editLink: false +contributors: false +--- + + +# `combinations` for [filters](/commands/categories/filters.md) + +
Generates all combinations of size k from the input list.
+ +## Signature + +```> combinations {flags} (k)``` + +## Parameters + + - `k`: The size of each combination (k). + + +## Input/output types: + +| input | output | +| --------- | --------------- | +| list<any> | list<list<any>> | +| table | table | +## Examples + +Generate all 2-combinations +```nu +> [1 2 3] | combinations 2 +╭───┬───────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 2 │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 3 │ │ +│ │ ╰───┴───╯ │ +│ 2 │ ╭───┬───╮ │ +│ │ │ 0 │ 2 │ │ +│ │ │ 1 │ 3 │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ + +``` + +Generate combinations of lists +```nu +> [[a] [b] [c]] | combinations 2 +╭───┬───────────────────╮ +│ 0 │ ╭───┬───────────╮ │ +│ │ │ 0 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ a │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ │ 1 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ b │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ ╰───┴───────────╯ │ +│ 1 │ ╭───┬───────────╮ │ +│ │ │ 0 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ a │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ │ 1 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ c │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ ╰───┴───────────╯ │ +│ 2 │ ╭───┬───────────╮ │ +│ │ │ 0 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ b │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ │ 1 │ ╭───┬───╮ │ │ +│ │ │ │ │ 0 │ c │ │ │ +│ │ │ │ ╰───┴───╯ │ │ +│ │ ╰───┴───────────╯ │ +╰───┴───────────────────╯ + +``` + +k > n yields an empty list +```nu +> [1 2] | combinations 3 +╭────────────╮ +│ empty list │ +╰────────────╯ + +``` diff --git a/commands/docs/commandline.md b/commands/docs/commandline.md index 4116dc736f1..1672d594526 100644 --- a/commands/docs/commandline.md +++ b/commands/docs/commandline.md @@ -2,7 +2,7 @@ title: commandline categories: | core -version: 0.113.0 +version: 0.114.0 core: | View the current command line input buffer. usage: | @@ -29,8 +29,9 @@ contributors: false ## Subcommands: -| name | description | type | -| -------------------------------------------------------------------- | --------------------------------------------- | -------- | -| [`commandline edit`](/commands/docs/commandline_edit.md) | Modify the current command line input buffer. | built-in | -| [`commandline get-cursor`](/commands/docs/commandline_get-cursor.md) | Get the current cursor position. | built-in | -| [`commandline set-cursor`](/commands/docs/commandline_set-cursor.md) | Set the current cursor position. | built-in | \ No newline at end of file +| name | description | type | +| -------------------------------------------------------------------- | ------------------------------------------------ | -------- | +| [`commandline complete`](/commands/docs/commandline_complete.md) | Complete a string using the default completions. | built-in | +| [`commandline edit`](/commands/docs/commandline_edit.md) | Modify the current command line input buffer. | built-in | +| [`commandline get-cursor`](/commands/docs/commandline_get-cursor.md) | Get the current cursor position. | built-in | +| [`commandline set-cursor`](/commands/docs/commandline_set-cursor.md) | Set the current cursor position. | built-in | \ No newline at end of file diff --git a/commands/docs/commandline_complete.md b/commands/docs/commandline_complete.md new file mode 100644 index 00000000000..723204b6c75 --- /dev/null +++ b/commands/docs/commandline_complete.md @@ -0,0 +1,73 @@ +--- +title: commandline complete +categories: | + core +version: 0.114.0 +core: | + Complete a string using the default completions. +usage: | + Complete a string using the default completions. +editLink: false +contributors: false +--- + + +# `commandline complete` for [core](/commands/categories/core.md) + +
Complete a string using the default completions.
+ +## Signature + +```> commandline complete {flags} ``` + +## Flags + + - `--detailed, -d`: Output completions as records, in the format expected from custom completers. + - `--type {string}`: The type of values to allow as completions. + + +## Input/output types: + +| input | output | +| ------- | --------------------------------- | +| nothing | oneof<list<string>, list<record>> | +| string | oneof<list<string>, list<record>> | +## Examples + +List completions for command names. +```nu +> def my-bar [] {}; def my-baz [] {}; 'my-' | commandline complete +╭───┬────────╮ +│ 0 │ my-bar │ +│ 1 │ my-baz │ +╰───┴────────╯ + +``` + +List completions for flags for a command. +```nu +> def cmd [--flag(-f): string] {}; 'cmd -' | commandline complete +╭───┬────────╮ +│ 0 │ --flag │ +│ 1 │ -f │ +╰───┴────────╯ + +``` + +Complete filepath or glob arguments. +```nu +> './' | commandline complete --type path + +``` + +Extend builtin completions for the current commandline. +```nu +> commandline complete | append 'foo' + +``` + +## Notes +This command can be used to obtain the completions that Nushell would normally provide for the given commandline contents. +Completions will be provided as if the cursor is placed at the end of the given string. + +If no input is provided, the current commandline contents will be used instead. \ No newline at end of file diff --git a/commands/docs/commandline_edit.md b/commands/docs/commandline_edit.md index f526a2a22c9..fbe4b5b7d29 100644 --- a/commands/docs/commandline_edit.md +++ b/commands/docs/commandline_edit.md @@ -2,7 +2,7 @@ title: commandline edit categories: | core -version: 0.113.0 +version: 0.114.0 core: | Modify the current command line input buffer. usage: | diff --git a/commands/docs/commandline_get-cursor.md b/commands/docs/commandline_get-cursor.md index f65c27e044f..c53ec7de951 100644 --- a/commands/docs/commandline_get-cursor.md +++ b/commands/docs/commandline_get-cursor.md @@ -2,7 +2,7 @@ title: commandline get-cursor categories: | core -version: 0.113.0 +version: 0.114.0 core: | Get the current cursor position. usage: | diff --git a/commands/docs/commandline_set-cursor.md b/commands/docs/commandline_set-cursor.md index 7480ea3f1a7..564e097f31b 100644 --- a/commands/docs/commandline_set-cursor.md +++ b/commands/docs/commandline_set-cursor.md @@ -2,7 +2,7 @@ title: commandline set-cursor categories: | core -version: 0.113.0 +version: 0.114.0 core: | Set the current cursor position. usage: | diff --git a/commands/docs/compact.md b/commands/docs/compact.md index b505e55f945..1059ab01bc9 100644 --- a/commands/docs/compact.md +++ b/commands/docs/compact.md @@ -2,7 +2,7 @@ title: compact categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Creates a table with non-empty rows. usage: | diff --git a/commands/docs/complete.md b/commands/docs/complete.md index 6c69a6e87d4..576305dce66 100644 --- a/commands/docs/complete.md +++ b/commands/docs/complete.md @@ -2,7 +2,7 @@ title: complete categories: | system -version: 0.113.0 +version: 0.114.0 system: | Capture the outputs and exit code from an external piped in command in a nushell table. usage: | diff --git a/commands/docs/config.md b/commands/docs/config.md index c0f2cd017ab..b528777acc7 100644 --- a/commands/docs/config.md +++ b/commands/docs/config.md @@ -2,7 +2,7 @@ title: config categories: | env -version: 0.113.0 +version: 0.114.0 env: | Edit nushell configuration files. usage: | diff --git a/commands/docs/config_env.md b/commands/docs/config_env.md index d65f77bb03e..08bfb45873c 100644 --- a/commands/docs/config_env.md +++ b/commands/docs/config_env.md @@ -2,7 +2,7 @@ title: config env categories: | env -version: 0.113.0 +version: 0.114.0 env: | Edit nu environment configurations. usage: | diff --git a/commands/docs/config_flatten.md b/commands/docs/config_flatten.md index 50777aceec8..e128b84fd06 100644 --- a/commands/docs/config_flatten.md +++ b/commands/docs/config_flatten.md @@ -2,7 +2,7 @@ title: config flatten categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Show the current configuration in a flattened form. usage: | diff --git a/commands/docs/config_nu.md b/commands/docs/config_nu.md index 6bad7d5534e..2a1c7923fed 100644 --- a/commands/docs/config_nu.md +++ b/commands/docs/config_nu.md @@ -2,7 +2,7 @@ title: config nu categories: | env -version: 0.113.0 +version: 0.114.0 env: | Edit nu configurations. usage: | diff --git a/commands/docs/config_reset.md b/commands/docs/config_reset.md index 720fce78a62..fa62176132c 100644 --- a/commands/docs/config_reset.md +++ b/commands/docs/config_reset.md @@ -2,7 +2,7 @@ title: config reset categories: | env -version: 0.113.0 +version: 0.114.0 env: | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. usage: | diff --git a/commands/docs/config_use-colors.md b/commands/docs/config_use-colors.md index 758424dd8f3..1679aa70f65 100644 --- a/commands/docs/config_use-colors.md +++ b/commands/docs/config_use-colors.md @@ -2,7 +2,7 @@ title: config use-colors categories: | env -version: 0.113.0 +version: 0.114.0 env: | Get the configuration for color output. usage: | diff --git a/commands/docs/const.md b/commands/docs/const.md index 31fb089e6e9..269388875ab 100644 --- a/commands/docs/const.md +++ b/commands/docs/const.md @@ -2,7 +2,7 @@ title: const categories: | core -version: 0.113.0 +version: 0.114.0 core: | Create a parse-time constant. usage: | diff --git a/commands/docs/continue.md b/commands/docs/continue.md index 737a54efffb..c02a1b9bc33 100644 --- a/commands/docs/continue.md +++ b/commands/docs/continue.md @@ -2,7 +2,7 @@ title: continue categories: | core -version: 0.113.0 +version: 0.114.0 core: | Continue a loop from the next iteration. usage: | diff --git a/commands/docs/cp.md b/commands/docs/cp.md index 2c010426c70..516cbd8f201 100644 --- a/commands/docs/cp.md +++ b/commands/docs/cp.md @@ -2,7 +2,7 @@ title: cp categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Copy files using uutils/coreutils cp. usage: | diff --git a/commands/docs/date.md b/commands/docs/date.md index 330a5b48d17..60b3c4abdbb 100644 --- a/commands/docs/date.md +++ b/commands/docs/date.md @@ -2,7 +2,7 @@ title: date categories: | date -version: 0.113.0 +version: 0.114.0 date: | Date-related commands. usage: | diff --git a/commands/docs/date_format.md b/commands/docs/date_format.md index 8b2c40970dc..4dc2b2bc7d3 100644 --- a/commands/docs/date_format.md +++ b/commands/docs/date_format.md @@ -2,7 +2,7 @@ title: date format categories: | removed -version: 0.113.0 +version: 0.114.0 removed: | Removed command: use `format date` instead. usage: | diff --git a/commands/docs/date_from-human.md b/commands/docs/date_from-human.md index e0f3dd2104a..f22db5c3546 100644 --- a/commands/docs/date_from-human.md +++ b/commands/docs/date_from-human.md @@ -2,7 +2,7 @@ title: date from-human categories: | date -version: 0.113.0 +version: 0.114.0 date: | Convert a human readable datetime string to a datetime. usage: | diff --git a/commands/docs/date_humanize.md b/commands/docs/date_humanize.md index 1978ead8eb4..6eeb8cddea8 100644 --- a/commands/docs/date_humanize.md +++ b/commands/docs/date_humanize.md @@ -2,7 +2,7 @@ title: date humanize categories: | date -version: 0.113.0 +version: 0.114.0 date: | Print a 'humanized' format for the date, relative to now. usage: | diff --git a/commands/docs/date_list-timezone.md b/commands/docs/date_list-timezone.md index 8f3e37ffaa5..8a55f2b6518 100644 --- a/commands/docs/date_list-timezone.md +++ b/commands/docs/date_list-timezone.md @@ -2,7 +2,7 @@ title: date list-timezone categories: | date -version: 0.113.0 +version: 0.114.0 date: | List supported time zones. usage: | diff --git a/commands/docs/date_now.md b/commands/docs/date_now.md index 8c4a51423f9..cd68f729c49 100644 --- a/commands/docs/date_now.md +++ b/commands/docs/date_now.md @@ -2,7 +2,7 @@ title: date now categories: | date -version: 0.113.0 +version: 0.114.0 date: | Get the current date. usage: | diff --git a/commands/docs/date_to-timezone.md b/commands/docs/date_to-timezone.md index 594d21824f4..54363908559 100644 --- a/commands/docs/date_to-timezone.md +++ b/commands/docs/date_to-timezone.md @@ -2,7 +2,7 @@ title: date to-timezone categories: | date -version: 0.113.0 +version: 0.114.0 date: | Convert a date to a given time zone. usage: | diff --git a/commands/docs/debug.md b/commands/docs/debug.md index bab57510724..fe2b2d25400 100644 --- a/commands/docs/debug.md +++ b/commands/docs/debug.md @@ -2,7 +2,7 @@ title: debug categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Debug print the value(s) piped in. usage: | diff --git a/commands/docs/debug_env.md b/commands/docs/debug_env.md index 24920260b61..246f0308bb9 100644 --- a/commands/docs/debug_env.md +++ b/commands/docs/debug_env.md @@ -2,7 +2,7 @@ title: debug env categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Show environment variables as external commands would get it. usage: | diff --git a/commands/docs/debug_experimental-options.md b/commands/docs/debug_experimental-options.md index 23d2c993cbe..63959e4d5b9 100644 --- a/commands/docs/debug_experimental-options.md +++ b/commands/docs/debug_experimental-options.md @@ -2,7 +2,7 @@ title: debug experimental-options categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Show all experimental options. usage: | diff --git a/commands/docs/debug_info.md b/commands/docs/debug_info.md index 5cc84bd522e..05ab71016f1 100644 --- a/commands/docs/debug_info.md +++ b/commands/docs/debug_info.md @@ -2,7 +2,7 @@ title: debug info categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View process memory info. usage: | diff --git a/commands/docs/debug_profile.md b/commands/docs/debug_profile.md index 6f36d249767..75f3386caad 100644 --- a/commands/docs/debug_profile.md +++ b/commands/docs/debug_profile.md @@ -2,7 +2,7 @@ title: debug profile categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Profile pipeline elements in a closure. usage: | diff --git a/commands/docs/decode.md b/commands/docs/decode.md index d1269649933..a8805e861fb 100644 --- a/commands/docs/decode.md +++ b/commands/docs/decode.md @@ -2,7 +2,7 @@ title: decode categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Decode bytes into a string. usage: | diff --git a/commands/docs/decode_base32.md b/commands/docs/decode_base32.md index 4e43803e5f3..0321f1fb8a1 100644 --- a/commands/docs/decode_base32.md +++ b/commands/docs/decode_base32.md @@ -2,7 +2,7 @@ title: decode base32 categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Decode a Base32-encoded value. usage: | diff --git a/commands/docs/decode_base32hex.md b/commands/docs/decode_base32hex.md index 1763af766f3..a86da7dc3a6 100644 --- a/commands/docs/decode_base32hex.md +++ b/commands/docs/decode_base32hex.md @@ -2,7 +2,7 @@ title: decode base32hex categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Encode a base32hex value. usage: | diff --git a/commands/docs/decode_base64.md b/commands/docs/decode_base64.md index 69e211f894b..8688e6b4975 100644 --- a/commands/docs/decode_base64.md +++ b/commands/docs/decode_base64.md @@ -2,7 +2,7 @@ title: decode base64 categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Decode a Base64-encoded value. usage: | diff --git a/commands/docs/decode_hex.md b/commands/docs/decode_hex.md index 8b0787ef305..7068105a130 100644 --- a/commands/docs/decode_hex.md +++ b/commands/docs/decode_hex.md @@ -2,7 +2,7 @@ title: decode hex categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Decode a hex-encoded value. usage: | diff --git a/commands/docs/def.md b/commands/docs/def.md index ec8f05925d0..48d92c107e0 100644 --- a/commands/docs/def.md +++ b/commands/docs/def.md @@ -2,7 +2,7 @@ title: def categories: | core -version: 0.113.0 +version: 0.114.0 core: | Define a custom command. usage: | diff --git a/commands/docs/default.md b/commands/docs/default.md index 7e3c9a55104..c06f972bbdb 100644 --- a/commands/docs/default.md +++ b/commands/docs/default.md @@ -2,7 +2,7 @@ title: default categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Sets a default value if a row's column is missing or null. usage: | diff --git a/commands/docs/describe.md b/commands/docs/describe.md index 3752814f51e..96d192f8727 100644 --- a/commands/docs/describe.md +++ b/commands/docs/describe.md @@ -2,7 +2,7 @@ title: describe categories: | core -version: 0.113.0 +version: 0.114.0 core: | Describe the type and structure of the value(s) piped in. usage: | diff --git a/commands/docs/detect.md b/commands/docs/detect.md index 3164bfb3c48..11c18ab0e9c 100644 --- a/commands/docs/detect.md +++ b/commands/docs/detect.md @@ -2,7 +2,7 @@ title: detect categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Various commands for detecting things. usage: | diff --git a/commands/docs/detect_columns.md b/commands/docs/detect_columns.md index 279a86317a7..ea1692c44b7 100644 --- a/commands/docs/detect_columns.md +++ b/commands/docs/detect_columns.md @@ -2,7 +2,7 @@ title: detect columns categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Attempt to automatically split text into multiple columns. usage: | diff --git a/commands/docs/detect_type.md b/commands/docs/detect_type.md index 7c55ecb38d4..42603073fe5 100644 --- a/commands/docs/detect_type.md +++ b/commands/docs/detect_type.md @@ -2,7 +2,7 @@ title: detect type categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Infer Nushell datatype from a string. usage: | @@ -103,7 +103,7 @@ Fri, 31 Dec 2021 00:00:00 +0800 (4 years ago) Date M-D-Y (default for ambiguous) ```nu > '01/02/2025' | detect type -Thu, 2 Jan 2025 00:00:00 +0800 (a year ago) +Thu, 2 Jan 2025 00:00:00 +0800 (2 years ago) ``` Prefer DMY for ambiguous dates diff --git a/commands/docs/difference.md b/commands/docs/difference.md new file mode 100644 index 00000000000..6077c6880a7 --- /dev/null +++ b/commands/docs/difference.md @@ -0,0 +1,65 @@ +--- +title: difference +categories: | + filters +version: 0.114.0 +filters: | + Returns a list of unique elements in the input that are not present in the other list. +usage: | + Returns a list of unique elements in the input that are not present in the other list. +editLink: false +contributors: false +--- + + +# `difference` for [filters](/commands/categories/filters.md) + +
Returns a list of unique elements in the input that are not present in the other list.
+ +## Signature + +```> difference {flags} (other)``` + +## Parameters + + - `other`: The other list to subtract from the input. + + +## Input/output types: + +| input | output | +| --------- | --------- | +| list<any> | list<any> | +| table | table | +## Examples + +Return the difference of two lists +```nu +> [1 2 3 4] | difference [3 4 5 6] +╭───┬───╮ +│ 0 │ 1 │ +│ 1 │ 2 │ +╰───┴───╯ + +``` + +Difference with duplicates in input +```nu +> [1 1 2 3] | difference [2 3] +╭───┬───╮ +│ 0 │ 1 │ +╰───┴───╯ + +``` + +Difference of two tables +```nu +> [{a:1} {a:2} {a:3}] | difference [{a:2} {a:4}] +╭───┬───╮ +│ # │ a │ +├───┼───┤ +│ 0 │ 1 │ +│ 1 │ 3 │ +╰───┴───╯ + +``` diff --git a/commands/docs/do.md b/commands/docs/do.md index 0f625c3065a..8b56d3f8c9d 100644 --- a/commands/docs/do.md +++ b/commands/docs/do.md @@ -2,7 +2,7 @@ title: do categories: | core -version: 0.113.0 +version: 0.114.0 core: | Run a closure, providing it with the pipeline input. usage: | diff --git a/commands/docs/drop.md b/commands/docs/drop.md index 0fcc557bd8f..738a54da030 100644 --- a/commands/docs/drop.md +++ b/commands/docs/drop.md @@ -2,7 +2,7 @@ title: drop categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Remove items/rows from the end of the input list/table. Counterpart of `skip`. Opposite of `last`. usage: | diff --git a/commands/docs/drop_column.md b/commands/docs/drop_column.md index 1ac84983fdd..28e31c884d3 100644 --- a/commands/docs/drop_column.md +++ b/commands/docs/drop_column.md @@ -2,7 +2,7 @@ title: drop column categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`. usage: | diff --git a/commands/docs/drop_nth.md b/commands/docs/drop_nth.md index 41fe26f53c4..e7972b70930 100644 --- a/commands/docs/drop_nth.md +++ b/commands/docs/drop_nth.md @@ -2,7 +2,7 @@ title: drop nth categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Drop the selected rows. usage: | diff --git a/commands/docs/du.md b/commands/docs/du.md index f9b98e0773b..c20b4182896 100644 --- a/commands/docs/du.md +++ b/commands/docs/du.md @@ -2,7 +2,7 @@ title: du categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Find disk usage sizes of specified items. usage: | diff --git a/commands/docs/each.md b/commands/docs/each.md index dab9653eeb0..64811a02643 100644 --- a/commands/docs/each.md +++ b/commands/docs/each.md @@ -2,7 +2,7 @@ title: each categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Run a closure on each row of the input list, creating a new list with the results. usage: | diff --git a/commands/docs/each_while.md b/commands/docs/each_while.md index d667f99029e..3dddef38d7a 100644 --- a/commands/docs/each_while.md +++ b/commands/docs/each_while.md @@ -2,7 +2,7 @@ title: each while categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Run a closure on each row of the input list until a null is found, then create a new list with the results. usage: | diff --git a/commands/docs/echo.md b/commands/docs/echo.md index 8f53f62d23b..511a992d409 100644 --- a/commands/docs/echo.md +++ b/commands/docs/echo.md @@ -2,7 +2,7 @@ title: echo categories: | core -version: 0.113.0 +version: 0.114.0 core: | Returns its arguments, ignoring the piped-in value. usage: | diff --git a/commands/docs/encode.md b/commands/docs/encode.md index e719a0f2f01..a2a49f85d1c 100644 --- a/commands/docs/encode.md +++ b/commands/docs/encode.md @@ -2,7 +2,7 @@ title: encode categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Encode a string into bytes. usage: | diff --git a/commands/docs/encode_base32.md b/commands/docs/encode_base32.md index efddb7258e0..c0154c580a8 100644 --- a/commands/docs/encode_base32.md +++ b/commands/docs/encode_base32.md @@ -2,7 +2,7 @@ title: encode base32 categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Encode a string or binary value using Base32. usage: | diff --git a/commands/docs/encode_base32hex.md b/commands/docs/encode_base32hex.md index d6035e4bec8..125a8655b22 100644 --- a/commands/docs/encode_base32hex.md +++ b/commands/docs/encode_base32hex.md @@ -2,7 +2,7 @@ title: encode base32hex categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Encode a binary value or a string using base32hex. usage: | diff --git a/commands/docs/encode_base64.md b/commands/docs/encode_base64.md index 380071245d3..459b4c51ce1 100644 --- a/commands/docs/encode_base64.md +++ b/commands/docs/encode_base64.md @@ -2,7 +2,7 @@ title: encode base64 categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Encode a string or binary value using Base64. usage: | diff --git a/commands/docs/encode_hex.md b/commands/docs/encode_hex.md index 59b3dc22e18..bbd76732287 100644 --- a/commands/docs/encode_hex.md +++ b/commands/docs/encode_hex.md @@ -2,7 +2,7 @@ title: encode hex categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Hex encode a binary value or a string. usage: | diff --git a/commands/docs/enumerate.md b/commands/docs/enumerate.md index 185ff27fad1..c402dee8db9 100644 --- a/commands/docs/enumerate.md +++ b/commands/docs/enumerate.md @@ -2,7 +2,7 @@ title: enumerate categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Enumerate the elements in a stream. usage: | diff --git a/commands/docs/error.md b/commands/docs/error.md index e8dadd7e354..1d959c717ef 100644 --- a/commands/docs/error.md +++ b/commands/docs/error.md @@ -2,7 +2,7 @@ title: error categories: | core -version: 0.113.0 +version: 0.114.0 core: | Various commands for working with errors. usage: | diff --git a/commands/docs/error_make.md b/commands/docs/error_make.md index fc8f21a040a..15724fdd41a 100644 --- a/commands/docs/error_make.md +++ b/commands/docs/error_make.md @@ -2,7 +2,7 @@ title: error make categories: | core -version: 0.113.0 +version: 0.114.0 core: | Create an error. usage: | diff --git a/commands/docs/every.md b/commands/docs/every.md index 1dd9cc93ee8..e41ab307e82 100644 --- a/commands/docs/every.md +++ b/commands/docs/every.md @@ -2,7 +2,7 @@ title: every categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Show (or skip) every n-th row, starting from the first one. usage: | diff --git a/commands/docs/exec.md b/commands/docs/exec.md index b30da59b8a7..557d94af711 100644 --- a/commands/docs/exec.md +++ b/commands/docs/exec.md @@ -2,7 +2,7 @@ title: exec categories: | system -version: 0.113.0 +version: 0.114.0 system: | Execute a command, replacing or exiting the current process, depending on platform. usage: | diff --git a/commands/docs/exit.md b/commands/docs/exit.md index 0dc8ae9efa8..7dbd91cdbe0 100644 --- a/commands/docs/exit.md +++ b/commands/docs/exit.md @@ -2,7 +2,7 @@ title: exit categories: | shells -version: 0.113.0 +version: 0.114.0 shells: | Exit Nu. usage: | diff --git a/commands/docs/explain.md b/commands/docs/explain.md index 75884573b44..e4edbf65b7d 100644 --- a/commands/docs/explain.md +++ b/commands/docs/explain.md @@ -2,7 +2,7 @@ title: explain categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Explain closure contents. usage: | diff --git a/commands/docs/explore.md b/commands/docs/explore.md index 71c3d594003..530c265ffd8 100644 --- a/commands/docs/explore.md +++ b/commands/docs/explore.md @@ -2,7 +2,7 @@ title: explore categories: | viewers -version: 0.113.0 +version: 0.114.0 viewers: | Explore acts as a table pager, just like `less` does for text. usage: | diff --git a/commands/docs/explore_config.md b/commands/docs/explore_config.md index abdd465c32f..dc7da6ab717 100644 --- a/commands/docs/explore_config.md +++ b/commands/docs/explore_config.md @@ -2,7 +2,7 @@ title: explore config categories: | viewers -version: 0.113.0 +version: 0.114.0 viewers: | Launch a TUI to view and edit the nushell configuration interactively. usage: | @@ -62,8 +62,8 @@ You can also pipe JSON data to explore arbitrary data structures, or use TUI Keybindings: Tab Switch between tree and editor panes - ↑↓ Navigate tree / scroll editor - ←→ Collapse/Expand tree nodes + ↑↓/jk Navigate tree / scroll editor + ←→/hl Collapse/Expand tree nodes Enter/Space Toggle tree node expansion Enter/Space On leaf nodes, open editor pane and start editing Enter/e Start editing (in editor pane) diff --git a/commands/docs/explore_regex.md b/commands/docs/explore_regex.md index 3794f38b857..b72caef3107 100644 --- a/commands/docs/explore_regex.md +++ b/commands/docs/explore_regex.md @@ -2,7 +2,7 @@ title: explore regex categories: | viewers -version: 0.113.0 +version: 0.114.0 viewers: | Launch a TUI to create and explore regular expressions interactively. usage: | diff --git a/commands/docs/export-env.md b/commands/docs/export-env.md index 16c3f89b9f3..a443d10b776 100644 --- a/commands/docs/export-env.md +++ b/commands/docs/export-env.md @@ -2,7 +2,7 @@ title: export-env categories: | env -version: 0.113.0 +version: 0.114.0 env: | Run a block and preserve its environment in a current scope. usage: | diff --git a/commands/docs/export.md b/commands/docs/export.md index cac2af6bcde..c93ed2f4c0f 100644 --- a/commands/docs/export.md +++ b/commands/docs/export.md @@ -2,7 +2,7 @@ title: export categories: | core -version: 0.113.0 +version: 0.114.0 core: | Export definitions or environment variables from a module. usage: | diff --git a/commands/docs/export_alias.md b/commands/docs/export_alias.md index 9edec86e166..b1b39c09e16 100644 --- a/commands/docs/export_alias.md +++ b/commands/docs/export_alias.md @@ -2,7 +2,7 @@ title: export alias categories: | core -version: 0.113.0 +version: 0.114.0 core: | Alias a command (with optional flags) to a new name and export it from a module. usage: | diff --git a/commands/docs/export_const.md b/commands/docs/export_const.md index d87fa79daad..b984bd0da2d 100644 --- a/commands/docs/export_const.md +++ b/commands/docs/export_const.md @@ -2,7 +2,7 @@ title: export const categories: | core -version: 0.113.0 +version: 0.114.0 core: | Use parse-time constant from a module and export them from this module. usage: | diff --git a/commands/docs/export_def.md b/commands/docs/export_def.md index bee7be637f2..4f2332e759e 100644 --- a/commands/docs/export_def.md +++ b/commands/docs/export_def.md @@ -2,7 +2,7 @@ title: export def categories: | core -version: 0.113.0 +version: 0.114.0 core: | Define a custom command and export it from a module. usage: | diff --git a/commands/docs/export_extern.md b/commands/docs/export_extern.md index 20e550b24fa..74cf3be1949 100644 --- a/commands/docs/export_extern.md +++ b/commands/docs/export_extern.md @@ -2,7 +2,7 @@ title: export extern categories: | core -version: 0.113.0 +version: 0.114.0 core: | Define an extern and export it from a module. usage: | diff --git a/commands/docs/export_module.md b/commands/docs/export_module.md index 081660ce423..1da2e650b42 100644 --- a/commands/docs/export_module.md +++ b/commands/docs/export_module.md @@ -2,7 +2,7 @@ title: export module categories: | core -version: 0.113.0 +version: 0.114.0 core: | Export a custom module from a module. usage: | diff --git a/commands/docs/export_use.md b/commands/docs/export_use.md index 5d41906fb05..e6bfc900b6b 100644 --- a/commands/docs/export_use.md +++ b/commands/docs/export_use.md @@ -2,7 +2,7 @@ title: export use categories: | core -version: 0.113.0 +version: 0.114.0 core: | Use definitions from a module and export them from this module. usage: | diff --git a/commands/docs/extern.md b/commands/docs/extern.md index abfb04bafb7..7df04e67612 100644 --- a/commands/docs/extern.md +++ b/commands/docs/extern.md @@ -2,7 +2,7 @@ title: extern categories: | core -version: 0.113.0 +version: 0.114.0 core: | Define a signature for an external command. usage: | diff --git a/commands/docs/fill.md b/commands/docs/fill.md index 7fb0990d027..14ba77a6295 100644 --- a/commands/docs/fill.md +++ b/commands/docs/fill.md @@ -2,7 +2,7 @@ title: fill categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Fill and align text in columns. usage: | diff --git a/commands/docs/filter.md b/commands/docs/filter.md index 99a56f0a33f..f2167e4ebd0 100644 --- a/commands/docs/filter.md +++ b/commands/docs/filter.md @@ -2,7 +2,7 @@ title: filter categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Filter values based on a predicate closure. usage: | diff --git a/commands/docs/find.md b/commands/docs/find.md index 77876d9bf26..c37284cd477 100644 --- a/commands/docs/find.md +++ b/commands/docs/find.md @@ -2,7 +2,7 @@ title: find categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Search for terms in the input data. usage: | diff --git a/commands/docs/first.md b/commands/docs/first.md index 099057cd2fe..b1bcbf7155f 100644 --- a/commands/docs/first.md +++ b/commands/docs/first.md @@ -2,7 +2,7 @@ title: first categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Return only the first several rows of the input. Counterpart of `last`. Opposite of `skip`. usage: | diff --git a/commands/docs/flatten.md b/commands/docs/flatten.md index 8d1a09d8c99..235fd029b7f 100644 --- a/commands/docs/flatten.md +++ b/commands/docs/flatten.md @@ -2,7 +2,7 @@ title: flatten categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Flatten a table by extracting nested values. usage: | diff --git a/commands/docs/for.md b/commands/docs/for.md index 30749f80b5b..f29f8de07d3 100644 --- a/commands/docs/for.md +++ b/commands/docs/for.md @@ -2,7 +2,7 @@ title: for categories: | core -version: 0.113.0 +version: 0.114.0 core: | Loop over a range. usage: | diff --git a/commands/docs/format.md b/commands/docs/format.md index a93eefc8b38..1af53697033 100644 --- a/commands/docs/format.md +++ b/commands/docs/format.md @@ -2,7 +2,7 @@ title: format categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Various commands for formatting data. usage: | diff --git a/commands/docs/format_bits.md b/commands/docs/format_bits.md index a9beb5b4d72..fe04bd4b353 100644 --- a/commands/docs/format_bits.md +++ b/commands/docs/format_bits.md @@ -2,7 +2,7 @@ title: format bits categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a string of binary data represented by 0 and 1. usage: | diff --git a/commands/docs/format_date.md b/commands/docs/format_date.md index 586e91fe580..ad7eabc5def 100644 --- a/commands/docs/format_date.md +++ b/commands/docs/format_date.md @@ -2,7 +2,7 @@ title: format date categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Format a given date using a format string. usage: | diff --git a/commands/docs/format_duration.md b/commands/docs/format_duration.md index 40862a2c317..750b98e533a 100644 --- a/commands/docs/format_duration.md +++ b/commands/docs/format_duration.md @@ -2,7 +2,7 @@ title: format duration categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Outputs duration with a specified unit of time. usage: | diff --git a/commands/docs/format_filesize.md b/commands/docs/format_filesize.md index 0d0725f0815..d3395e5d4e1 100644 --- a/commands/docs/format_filesize.md +++ b/commands/docs/format_filesize.md @@ -2,7 +2,7 @@ title: format filesize categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Converts a column of filesizes to some specified format. usage: | diff --git a/commands/docs/format_number.md b/commands/docs/format_number.md index f1e5b8e643a..7e4a3cc8acf 100644 --- a/commands/docs/format_number.md +++ b/commands/docs/format_number.md @@ -2,7 +2,7 @@ title: format number categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Format a number. usage: | diff --git a/commands/docs/format_pattern.md b/commands/docs/format_pattern.md index aaa23d914ab..5a62f04f92f 100644 --- a/commands/docs/format_pattern.md +++ b/commands/docs/format_pattern.md @@ -2,7 +2,7 @@ title: format pattern categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Format columns into a string using a simple pattern. usage: | diff --git a/commands/docs/from.md b/commands/docs/from.md index ac6a8cfeed2..858857ba399 100644 --- a/commands/docs/from.md +++ b/commands/docs/from.md @@ -2,7 +2,7 @@ title: from categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse a string or binary data into structured data. usage: | @@ -38,6 +38,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`from ics`](/commands/docs/from_ics.md) | Parse text as .ics and create table. | plugin | | [`from ini`](/commands/docs/from_ini.md) | Parse text as .ini and create table. | plugin | | [`from json`](/commands/docs/from_json.md) | Convert JSON text into structured data. | built-in | +| [`from kdl`](/commands/docs/from_kdl.md) | Convert KDL text into structured data. | built-in | | [`from md`](/commands/docs/from_md.md) | Convert markdown text into human-friendly structured rows. Use --verbose for the full AST. | built-in | | [`from msgpack`](/commands/docs/from_msgpack.md) | Convert MessagePack data into Nu values. | built-in | | [`from msgpackz`](/commands/docs/from_msgpackz.md) | Convert brotli-compressed MessagePack data into Nu values. | built-in | diff --git a/commands/docs/from_csv.md b/commands/docs/from_csv.md index 5f5bf68cae4..8ca732287ff 100644 --- a/commands/docs/from_csv.md +++ b/commands/docs/from_csv.md @@ -2,7 +2,7 @@ title: from csv categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .csv and create table. usage: | diff --git a/commands/docs/from_eml.md b/commands/docs/from_eml.md index fc5f4682e87..45b04f3584b 100644 --- a/commands/docs/from_eml.md +++ b/commands/docs/from_eml.md @@ -2,7 +2,7 @@ title: from eml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .eml and create record. usage: | diff --git a/commands/docs/from_ics.md b/commands/docs/from_ics.md index aabff0fa039..7b9e2a26bf8 100644 --- a/commands/docs/from_ics.md +++ b/commands/docs/from_ics.md @@ -2,7 +2,7 @@ title: from ics categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .ics and create table. usage: | diff --git a/commands/docs/from_ini.md b/commands/docs/from_ini.md index 07802bdf94d..5e5affdbc87 100644 --- a/commands/docs/from_ini.md +++ b/commands/docs/from_ini.md @@ -2,7 +2,7 @@ title: from ini categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .ini and create table. usage: | diff --git a/commands/docs/from_json.md b/commands/docs/from_json.md index 7cdd83fcffa..37835409dfd 100644 --- a/commands/docs/from_json.md +++ b/commands/docs/from_json.md @@ -2,7 +2,7 @@ title: from json categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert JSON text into structured data. usage: | diff --git a/commands/docs/from_kdl.md b/commands/docs/from_kdl.md new file mode 100644 index 00000000000..82d75a108f1 --- /dev/null +++ b/commands/docs/from_kdl.md @@ -0,0 +1,134 @@ +--- +title: from kdl +categories: | + formats +version: 0.114.0 +formats: | + Convert KDL text into structured data. +usage: | + Convert KDL text into structured data. +editLink: false +contributors: false +--- + + +# `from kdl` for [formats](/commands/categories/formats.md) + +
Convert KDL text into structured data.
+ +## Signature + +```> from kdl {flags} ``` + + +## Input/output types: + +| input | output | +| ------ | ------ | +| string | any | +## Examples + +Converts KDL formatted string to canonical node rows. +```nu +> "node attr=1 attr2=#true {bloc}" | from kdl +╭───┬──────┬────────────────┬──────────────────┬─────────────────────────────────────────────────────────────╮ +│ # │ name │ args │ props │ children │ +├───┼──────┼────────────────┼──────────────────┼─────────────────────────────────────────────────────────────┤ +│ 0 │ node │ [list 0 items] │ ╭───────┬──────╮ │ ╭───┬──────┬────────────────┬───────────────────┬─────────╮ │ +│ │ │ │ │ attr │ 1 │ │ │ # │ name │ args │ props │ childre │ │ +│ │ │ │ │ attr2 │ true │ │ │ │ │ │ │ n │ │ +│ │ │ │ ╰───────┴──────╯ │ ├───┼──────┼────────────────┼───────────────────┼─────────┤ │ +│ │ │ │ │ │ 0 │ bloc │ [list 0 items] │ {record 0 fields} │ [list 0 │ │ +│ │ │ │ │ │ │ │ │ │ items] │ │ +│ │ │ │ │ ╰───┴──────┴────────────────┴───────────────────┴─────────╯ │ +╰───┴──────┴────────────────┴──────────────────┴─────────────────────────────────────────────────────────────╯ + +``` + +Converts KDL formatted string to canonical node rows. +```nu +> 'package { name nu; version 0.1; description "new type of shell" }' | from kdl +╭───┬─────────┬────────────────┬───────────────────┬─────────────────────────────────────────────────────────╮ +│ # │ name │ args │ props │ children │ +├───┼─────────┼────────────────┼───────────────────┼─────────────────────────────────────────────────────────┤ +│ 0 │ package │ [list 0 items] │ {record 0 fields} │ ╭───┬─────────────┬───────────────────────────┬───┬───╮ │ +│ │ │ │ │ │ # │ name │ args │ p │ c │ │ +│ │ │ │ │ │ │ │ │ r │ h │ │ +│ │ │ │ │ │ │ │ │ o │ i │ │ +│ │ │ │ │ │ │ │ │ p │ l │ │ +│ │ │ │ │ │ │ │ │ s │ d │ │ +│ │ │ │ │ │ │ │ │ │ r │ │ +│ │ │ │ │ │ │ │ │ │ e │ │ +│ │ │ │ │ │ │ │ │ │ n │ │ +│ │ │ │ │ ├───┼─────────────┼───────────────────────────┼───┼───┤ │ +│ │ │ │ │ │ 0 │ name │ ╭───┬────╮ │ { │ [ │ │ +│ │ │ │ │ │ │ │ │ 0 │ nu │ │ r │ l │ │ +│ │ │ │ │ │ │ │ ╰───┴────╯ │ e │ i │ │ +│ │ │ │ │ │ │ │ │ c │ s │ │ +│ │ │ │ │ │ │ │ │ o │ t │ │ +│ │ │ │ │ │ │ │ │ r │ │ │ +│ │ │ │ │ │ │ │ │ d │ 0 │ │ +│ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ 0 │ i │ │ +│ │ │ │ │ │ │ │ │ │ t │ │ +│ │ │ │ │ │ │ │ │ f │ e │ │ +│ │ │ │ │ │ │ │ │ i │ m │ │ +│ │ │ │ │ │ │ │ │ e │ s │ │ +│ │ │ │ │ │ │ │ │ l │ ] │ │ +│ │ │ │ │ │ │ │ │ d │ │ │ +│ │ │ │ │ │ │ │ │ s │ │ │ +│ │ │ │ │ │ │ │ │ } │ │ │ +│ │ │ │ │ │ 1 │ version │ ╭───┬──────╮ │ { │ [ │ │ +│ │ │ │ │ │ │ │ │ 0 │ 0.10 │ │ r │ l │ │ +│ │ │ │ │ │ │ │ ╰───┴──────╯ │ e │ i │ │ +│ │ │ │ │ │ │ │ │ c │ s │ │ +│ │ │ │ │ │ │ │ │ o │ t │ │ +│ │ │ │ │ │ │ │ │ r │ │ │ +│ │ │ │ │ │ │ │ │ d │ 0 │ │ +│ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ 0 │ i │ │ +│ │ │ │ │ │ │ │ │ │ t │ │ +│ │ │ │ │ │ │ │ │ f │ e │ │ +│ │ │ │ │ │ │ │ │ i │ m │ │ +│ │ │ │ │ │ │ │ │ e │ s │ │ +│ │ │ │ │ │ │ │ │ l │ ] │ │ +│ │ │ │ │ │ │ │ │ d │ │ │ +│ │ │ │ │ │ │ │ │ s │ │ │ +│ │ │ │ │ │ │ │ │ } │ │ │ +│ │ │ │ │ │ 2 │ description │ ╭───┬───────────────────╮ │ { │ [ │ │ +│ │ │ │ │ │ │ │ │ 0 │ new type of shell │ │ r │ l │ │ +│ │ │ │ │ │ │ │ ╰───┴───────────────────╯ │ e │ i │ │ +│ │ │ │ │ │ │ │ │ c │ s │ │ +│ │ │ │ │ │ │ │ │ o │ t │ │ +│ │ │ │ │ │ │ │ │ r │ │ │ +│ │ │ │ │ │ │ │ │ d │ 0 │ │ +│ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ 0 │ i │ │ +│ │ │ │ │ │ │ │ │ │ t │ │ +│ │ │ │ │ │ │ │ │ f │ e │ │ +│ │ │ │ │ │ │ │ │ i │ m │ │ +│ │ │ │ │ │ │ │ │ e │ s │ │ +│ │ │ │ │ │ │ │ │ l │ ] │ │ +│ │ │ │ │ │ │ │ │ d │ │ │ +│ │ │ │ │ │ │ │ │ s │ │ │ +│ │ │ │ │ │ │ │ │ } │ │ │ +│ │ │ │ │ ╰───┴─────────────┴───────────────────────────┴───┴───╯ │ +╰───┴─────────┴────────────────┴───────────────────┴─────────────────────────────────────────────────────────╯ + +``` + +Duplicate sibling node names are preserved in-order. +```nu +> "node one; node two" | from kdl +╭───┬──────┬─────────────┬───────────────────┬────────────────╮ +│ # │ name │ args │ props │ children │ +├───┼──────┼─────────────┼───────────────────┼────────────────┤ +│ 0 │ node │ ╭───┬─────╮ │ {record 0 fields} │ [list 0 items] │ +│ │ │ │ 0 │ one │ │ │ │ +│ │ │ ╰───┴─────╯ │ │ │ +│ 1 │ node │ ╭───┬─────╮ │ {record 0 fields} │ [list 0 items] │ +│ │ │ │ 0 │ two │ │ │ │ +│ │ │ ╰───┴─────╯ │ │ │ +╰───┴──────┴─────────────┴───────────────────┴────────────────╯ + +``` diff --git a/commands/docs/from_md.md b/commands/docs/from_md.md index c8f97a9d817..24e2701cd82 100644 --- a/commands/docs/from_md.md +++ b/commands/docs/from_md.md @@ -2,7 +2,7 @@ title: from md categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert markdown text into human-friendly structured rows. Use --verbose for the full AST. usage: | diff --git a/commands/docs/from_msgpack.md b/commands/docs/from_msgpack.md index a0946779229..fc4d02b9acc 100644 --- a/commands/docs/from_msgpack.md +++ b/commands/docs/from_msgpack.md @@ -2,7 +2,7 @@ title: from msgpack categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert MessagePack data into Nu values. usage: | diff --git a/commands/docs/from_msgpackz.md b/commands/docs/from_msgpackz.md index 22cc89afb6c..4a275edd9b3 100644 --- a/commands/docs/from_msgpackz.md +++ b/commands/docs/from_msgpackz.md @@ -2,7 +2,7 @@ title: from msgpackz categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert brotli-compressed MessagePack data into Nu values. usage: | diff --git a/commands/docs/from_nuon.md b/commands/docs/from_nuon.md index 4db31479906..85c2bd81b63 100644 --- a/commands/docs/from_nuon.md +++ b/commands/docs/from_nuon.md @@ -2,7 +2,7 @@ title: from nuon categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert from nuon to structured data. usage: | diff --git a/commands/docs/from_ods.md b/commands/docs/from_ods.md index 43c3b1bb3d8..a3cf9a21014 100644 --- a/commands/docs/from_ods.md +++ b/commands/docs/from_ods.md @@ -2,7 +2,7 @@ title: from ods categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse OpenDocument Spreadsheet(.ods) data and create table. usage: | @@ -23,13 +23,16 @@ contributors: false ## Flags - `--sheets, -s {list}`: Only convert specified sheets. + - `--noheaders, -n`: Don't treat the first row as column names. + - `--first-row, -f {int}`: The row to start reading the sheets from. By default, reading starts from the firsts non empty row. + - `--prefer-integers, -i`: Convert whole-number floats (for example, 40.0) to integers, leaving non-whole floats unchanged. ## Input/output types: | input | output | | ------ | ------ | -| string | table | +| binary | record | ## Examples Convert binary .ods data to a table. @@ -43,3 +46,9 @@ Convert binary .ods data to a table, specifying the tables. > open --raw test.ods | from ods --sheets [Spreadsheet1] ``` + +Convert binary .ods data to a table, specifying the tables and specifying no header row. +```nu +> open --raw test.ods | from ods --sheets [Spreadsheet1] --noheaders + +``` diff --git a/commands/docs/from_plist.md b/commands/docs/from_plist.md index 74b804b2f22..8eb028a3079 100644 --- a/commands/docs/from_plist.md +++ b/commands/docs/from_plist.md @@ -2,7 +2,7 @@ title: from plist categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert plist to Nushell values usage: | diff --git a/commands/docs/from_ssv.md b/commands/docs/from_ssv.md index c83cfb6c6b8..89fd7a13c11 100644 --- a/commands/docs/from_ssv.md +++ b/commands/docs/from_ssv.md @@ -2,7 +2,7 @@ title: from ssv categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as space-separated values and create a table. The default minimum number of spaces counted as a separator is 2. usage: | diff --git a/commands/docs/from_toml.md b/commands/docs/from_toml.md index 7bd8fbf2e07..28d6d47044a 100644 --- a/commands/docs/from_toml.md +++ b/commands/docs/from_toml.md @@ -2,7 +2,7 @@ title: from toml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .toml and create record. usage: | diff --git a/commands/docs/from_tsv.md b/commands/docs/from_tsv.md index 323ab49c1f6..a34852a7e96 100644 --- a/commands/docs/from_tsv.md +++ b/commands/docs/from_tsv.md @@ -2,7 +2,7 @@ title: from tsv categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .tsv and create table. usage: | diff --git a/commands/docs/from_url.md b/commands/docs/from_url.md index 980432a1035..56c251ab7eb 100644 --- a/commands/docs/from_url.md +++ b/commands/docs/from_url.md @@ -2,7 +2,7 @@ title: from url categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse url-encoded string as a record. usage: | diff --git a/commands/docs/from_vcf.md b/commands/docs/from_vcf.md index 70000a87d09..0c9a7751c64 100644 --- a/commands/docs/from_vcf.md +++ b/commands/docs/from_vcf.md @@ -2,7 +2,7 @@ title: from vcf categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .vcf and create table. usage: | diff --git a/commands/docs/from_xlsx.md b/commands/docs/from_xlsx.md index 5c85bf5d6da..876349d80de 100644 --- a/commands/docs/from_xlsx.md +++ b/commands/docs/from_xlsx.md @@ -2,7 +2,7 @@ title: from xlsx categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse binary Excel(.xlsx) data and create table. usage: | @@ -23,14 +23,16 @@ contributors: false ## Flags - `--sheets, -s {list}`: Only convert specified sheets. - - `--header-row, -r {oneof}`: Specify row (0-indexed) to designate the header (default first non-empty row) or null for no header + - `--noheaders, -n`: Don't treat the first row as column names. + - `--first-row, -f {int}`: The row to start reading the sheets from. By default, reading starts from the firsts non empty row. + - `--prefer-integers, -i`: Convert whole-number floats (for example, 40.0) to integers, leaving non-whole floats unchanged. ## Input/output types: | input | output | | ------ | ------ | -| binary | table | +| binary | record | ## Examples Convert binary .xlsx data to a table. @@ -47,6 +49,6 @@ Convert binary .xlsx data to a table, specifying the tables. Convert binary .xlsx data to a table, specifying the tables and specifying no header row. ```nu -> open --raw test.xlsx | from xlsx --sheets [Spreadsheet1] --header-row null +> open --raw test.xlsx | from xlsx --sheets [Spreadsheet1] --noheaders ``` diff --git a/commands/docs/from_xml.md b/commands/docs/from_xml.md index 5bef80a76d2..c6d70435f40 100644 --- a/commands/docs/from_xml.md +++ b/commands/docs/from_xml.md @@ -2,7 +2,7 @@ title: from xml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .xml and create record. usage: | diff --git a/commands/docs/from_yaml.md b/commands/docs/from_yaml.md index ca4a2d25b38..2f80543e319 100644 --- a/commands/docs/from_yaml.md +++ b/commands/docs/from_yaml.md @@ -2,7 +2,7 @@ title: from yaml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .yaml/.yml and create table. usage: | diff --git a/commands/docs/from_yml.md b/commands/docs/from_yml.md index 29cd9388c62..607697678a8 100644 --- a/commands/docs/from_yml.md +++ b/commands/docs/from_yml.md @@ -2,7 +2,7 @@ title: from yml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Parse text as .yaml/.yml and create table. usage: | diff --git a/commands/docs/generate.md b/commands/docs/generate.md index ee5d5b6d080..9c5ae7b4d41 100644 --- a/commands/docs/generate.md +++ b/commands/docs/generate.md @@ -2,7 +2,7 @@ title: generate categories: | generators -version: 0.113.0 +version: 0.114.0 generators: | Generate a list of values by successively invoking a closure. usage: | diff --git a/commands/docs/get.md b/commands/docs/get.md index d26cff6c449..fe225bc6fd4 100644 --- a/commands/docs/get.md +++ b/commands/docs/get.md @@ -2,7 +2,7 @@ title: get categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Extract data using a cell path. usage: | diff --git a/commands/docs/glob.md b/commands/docs/glob.md index 1b44ba140fd..59be6429e10 100644 --- a/commands/docs/glob.md +++ b/commands/docs/glob.md @@ -2,7 +2,7 @@ title: glob categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Creates a list of files and/or folders based on the glob pattern provided. usage: | @@ -114,4 +114,4 @@ Search for files following symbolic links to their targets. ``` ## Notes -For more glob pattern help, please refer to https://docs.rs/crate/wax/latest \ No newline at end of file +For more glob pattern help, please refer to https://docs.rs/crate/wax/latest. \ No newline at end of file diff --git a/commands/docs/grid.md b/commands/docs/grid.md index c4fb017f139..f76b994f991 100644 --- a/commands/docs/grid.md +++ b/commands/docs/grid.md @@ -2,7 +2,7 @@ title: grid categories: | viewers -version: 0.113.0 +version: 0.114.0 viewers: | Renders the output to a textual terminal grid. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | --------- | ------ | | list<any> | string | -| record | string | ## Examples Render a simple list to a grid @@ -54,13 +53,6 @@ The above example is the same as: ``` -Render a record to a grid (deprecated) -```nu -> {name: 'foo', b: 1, c: 2} | grid -foo - -``` - Render a list of records to a grid ```nu > [{name: 'A', v: 1} {name: 'B', v: 2} {name: 'C', v: 3}] | grid name @@ -83,5 +75,6 @@ Render a table with 'name' column in it to a grid with icons and colors ## Notes The `grid` command creates a concise gridded layout for the input. It -prints every item of the list in a grid layout. However, for table, -you need to provide the name of the column you want to put in the grid. \ No newline at end of file +prints every item of the list in a grid layout. For tables or list +containing records, it will look for a 'name' column by default; if +the 'name' column is missing, the entire record is rendered instead. \ No newline at end of file diff --git a/commands/docs/group-by.md b/commands/docs/group-by.md index e1fa082c400..1dfab40522b 100644 --- a/commands/docs/group-by.md +++ b/commands/docs/group-by.md @@ -2,7 +2,7 @@ title: group-by categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Splits a list or table into groups, and returns a record containing those groups. usage: | diff --git a/commands/docs/gstat.md b/commands/docs/gstat.md index 268d985396f..ce8edee6631 100644 --- a/commands/docs/gstat.md +++ b/commands/docs/gstat.md @@ -2,7 +2,7 @@ title: gstat categories: | prompt -version: 0.113.0 +version: 0.114.0 prompt: | Get the git status of a repo usage: | diff --git a/commands/docs/hash.md b/commands/docs/hash.md index 23f1a0eb062..759bf73f1f8 100644 --- a/commands/docs/hash.md +++ b/commands/docs/hash.md @@ -2,7 +2,7 @@ title: hash categories: | hash -version: 0.113.0 +version: 0.114.0 hash: | Apply hash function. usage: | diff --git a/commands/docs/hash_md5.md b/commands/docs/hash_md5.md index d7628294d72..9a82a493438 100644 --- a/commands/docs/hash_md5.md +++ b/commands/docs/hash_md5.md @@ -2,7 +2,7 @@ title: hash md5 categories: | hash -version: 0.113.0 +version: 0.114.0 hash: | Hash a value using the md5 hash algorithm. usage: | @@ -53,6 +53,12 @@ Length: 16 (0x10) bytes | null_char printable whitespace ascii_other non_ascii ``` +Return the md5 hash of binary data +```nu +> 0x[deadbeef] | hash md5 + +``` + Return the md5 hash of a file's contents ```nu > open ./nu_0_24_1_windows.zip | hash md5 diff --git a/commands/docs/hash_sha256.md b/commands/docs/hash_sha256.md index 66a77c76a2c..2e3801e9465 100644 --- a/commands/docs/hash_sha256.md +++ b/commands/docs/hash_sha256.md @@ -2,7 +2,7 @@ title: hash sha256 categories: | hash -version: 0.113.0 +version: 0.114.0 hash: | Hash a value using the sha256 hash algorithm. usage: | @@ -54,6 +54,12 @@ Length: 32 (0x20) bytes | null_char printable whitespace ascii_other non_ascii ``` +Return the sha256 hash of binary data +```nu +> 0x[deadbeef] | hash sha256 + +``` + Return the sha256 hash of a file's contents ```nu > open ./nu_0_24_1_windows.zip | hash sha256 diff --git a/commands/docs/headers.md b/commands/docs/headers.md index 9a50fb90d5e..ad443de68ae 100644 --- a/commands/docs/headers.md +++ b/commands/docs/headers.md @@ -2,7 +2,7 @@ title: headers categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Use the first row of the table as column names. usage: | diff --git a/commands/docs/help.md b/commands/docs/help.md index 6776e2f8a1a..20df505b20f 100644 --- a/commands/docs/help.md +++ b/commands/docs/help.md @@ -2,7 +2,7 @@ title: help categories: | core -version: 0.113.0 +version: 0.114.0 core: | Display help information about different parts of Nushell. usage: | diff --git a/commands/docs/help_aliases.md b/commands/docs/help_aliases.md index 7f3084cf18e..17b5dc33120 100644 --- a/commands/docs/help_aliases.md +++ b/commands/docs/help_aliases.md @@ -2,7 +2,7 @@ title: help aliases categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell aliases. usage: | diff --git a/commands/docs/help_commands.md b/commands/docs/help_commands.md index 49f697b6b5a..7c0b993c24e 100644 --- a/commands/docs/help_commands.md +++ b/commands/docs/help_commands.md @@ -2,7 +2,7 @@ title: help commands categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell commands. usage: | diff --git a/commands/docs/help_escapes.md b/commands/docs/help_escapes.md index 81bf4c53c46..e14166b4861 100644 --- a/commands/docs/help_escapes.md +++ b/commands/docs/help_escapes.md @@ -2,7 +2,7 @@ title: help escapes categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell string escapes. usage: | diff --git a/commands/docs/help_externs.md b/commands/docs/help_externs.md index 1db6bd592d6..b16578b5642 100644 --- a/commands/docs/help_externs.md +++ b/commands/docs/help_externs.md @@ -2,7 +2,7 @@ title: help externs categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell externs. usage: | diff --git a/commands/docs/help_modules.md b/commands/docs/help_modules.md index 170b5a78a9a..f943cdc3c34 100644 --- a/commands/docs/help_modules.md +++ b/commands/docs/help_modules.md @@ -2,7 +2,7 @@ title: help modules categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell modules. usage: | diff --git a/commands/docs/help_operators.md b/commands/docs/help_operators.md index 63570c2ebe4..57b5c4e60a7 100644 --- a/commands/docs/help_operators.md +++ b/commands/docs/help_operators.md @@ -2,7 +2,7 @@ title: help operators categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell operators. usage: | diff --git a/commands/docs/help_pipe-and-redirect.md b/commands/docs/help_pipe-and-redirect.md index ac0375d4009..ffefe7a2e36 100644 --- a/commands/docs/help_pipe-and-redirect.md +++ b/commands/docs/help_pipe-and-redirect.md @@ -2,7 +2,7 @@ title: help pipe-and-redirect categories: | core -version: 0.113.0 +version: 0.114.0 core: | Show help on nushell pipes and redirects. usage: | diff --git a/commands/docs/hide-env.md b/commands/docs/hide-env.md index dce2ae149b4..34545081d5c 100644 --- a/commands/docs/hide-env.md +++ b/commands/docs/hide-env.md @@ -2,7 +2,7 @@ title: hide-env categories: | core -version: 0.113.0 +version: 0.114.0 core: | Hide environment variables in the current scope. usage: | diff --git a/commands/docs/hide.md b/commands/docs/hide.md index 1e77cfcba86..bb51917e935 100644 --- a/commands/docs/hide.md +++ b/commands/docs/hide.md @@ -2,7 +2,7 @@ title: hide categories: | core -version: 0.113.0 +version: 0.114.0 core: | Hide definitions in the current scope. usage: | diff --git a/commands/docs/histogram.md b/commands/docs/histogram.md index c22c80d51fa..d110bccf230 100644 --- a/commands/docs/histogram.md +++ b/commands/docs/histogram.md @@ -2,7 +2,7 @@ title: histogram categories: | chart -version: 0.113.0 +version: 0.114.0 chart: | Creates a new table with a histogram based on the column name passed in. usage: | diff --git a/commands/docs/history.md b/commands/docs/history.md index 8f2be1b34f5..df0e8298b48 100644 --- a/commands/docs/history.md +++ b/commands/docs/history.md @@ -2,7 +2,7 @@ title: history categories: | history -version: 0.113.0 +version: 0.114.0 history: | Get the command history. usage: | diff --git a/commands/docs/history_import.md b/commands/docs/history_import.md index b052a3ae290..4e6774c8613 100644 --- a/commands/docs/history_import.md +++ b/commands/docs/history_import.md @@ -2,7 +2,7 @@ title: history import categories: | history -version: 0.113.0 +version: 0.114.0 history: | Import command line history. usage: | diff --git a/commands/docs/history_session.md b/commands/docs/history_session.md index 0522e1dfa70..6fbd7d7a7a0 100644 --- a/commands/docs/history_session.md +++ b/commands/docs/history_session.md @@ -2,7 +2,7 @@ title: history session categories: | history -version: 0.113.0 +version: 0.114.0 history: | Get the command history session. usage: | diff --git a/commands/docs/http.md b/commands/docs/http.md index 214120b2d80..e0c4090845d 100644 --- a/commands/docs/http.md +++ b/commands/docs/http.md @@ -2,7 +2,7 @@ title: http categories: | network -version: 0.113.0 +version: 0.114.0 network: | Various commands for working with http methods. usage: | diff --git a/commands/docs/http_delete.md b/commands/docs/http_delete.md index 731727ccf41..0631980fa6b 100644 --- a/commands/docs/http_delete.md +++ b/commands/docs/http_delete.md @@ -2,7 +2,7 @@ title: http delete categories: | network -version: 0.113.0 +version: 0.114.0 network: | Delete the specified resource. usage: | diff --git a/commands/docs/http_get.md b/commands/docs/http_get.md index 512a78a00ad..22b67fe3a22 100644 --- a/commands/docs/http_get.md +++ b/commands/docs/http_get.md @@ -2,7 +2,7 @@ title: http get categories: | network -version: 0.113.0 +version: 0.114.0 network: | Fetch the contents from a URL. usage: | diff --git a/commands/docs/http_head.md b/commands/docs/http_head.md index 6dffa9c1573..bf727cfe2f7 100644 --- a/commands/docs/http_head.md +++ b/commands/docs/http_head.md @@ -2,7 +2,7 @@ title: http head categories: | network -version: 0.113.0 +version: 0.114.0 network: | Get the headers from a URL. usage: | diff --git a/commands/docs/http_options.md b/commands/docs/http_options.md index 758a246dd07..35cbd08f583 100644 --- a/commands/docs/http_options.md +++ b/commands/docs/http_options.md @@ -2,7 +2,7 @@ title: http options categories: | network -version: 0.113.0 +version: 0.114.0 network: | Requests permitted communication options for a given URL. usage: | diff --git a/commands/docs/http_patch.md b/commands/docs/http_patch.md index e3103a7536e..8a2d19a2eac 100644 --- a/commands/docs/http_patch.md +++ b/commands/docs/http_patch.md @@ -2,7 +2,7 @@ title: http patch categories: | network -version: 0.113.0 +version: 0.114.0 network: | Send a PATCH request to a URL with a request body. usage: | diff --git a/commands/docs/http_pool.md b/commands/docs/http_pool.md index af93586144a..0154073830d 100644 --- a/commands/docs/http_pool.md +++ b/commands/docs/http_pool.md @@ -2,7 +2,7 @@ title: http pool categories: | network -version: 0.113.0 +version: 0.114.0 network: | Configure and reset builtin http connection pool. usage: | diff --git a/commands/docs/http_post.md b/commands/docs/http_post.md index 7e25c3c8739..e5f633d7c70 100644 --- a/commands/docs/http_post.md +++ b/commands/docs/http_post.md @@ -2,7 +2,7 @@ title: http post categories: | network -version: 0.113.0 +version: 0.114.0 network: | Send a POST request to a URL with a request body. usage: | diff --git a/commands/docs/http_put.md b/commands/docs/http_put.md index 2c2423bacd1..22c8929b0d8 100644 --- a/commands/docs/http_put.md +++ b/commands/docs/http_put.md @@ -2,7 +2,7 @@ title: http put categories: | network -version: 0.113.0 +version: 0.114.0 network: | Send a PUT request to a URL with a request body. usage: | diff --git a/commands/docs/idx.md b/commands/docs/idx.md index 1839c9ae2d3..f9cf534f351 100644 --- a/commands/docs/idx.md +++ b/commands/docs/idx.md @@ -2,7 +2,7 @@ title: idx categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Manage in-memory file index state. usage: | @@ -33,10 +33,10 @@ Use one of the subcommands: init, status, find, search, export, import, drop, di | name | description | type | | -------------------------------------------- | ----------------------------------------------------------------------- | -------- | -| [`idx dirs`](/commands/docs/idx_dirs.md) | List indexed directories from idx state. | built-in | +| [`idx dirs`](/commands/docs/idx_dirs.md) | List indexed directories, or fuzzy-match directories by query. | built-in | | [`idx drop`](/commands/docs/idx_drop.md) | Drop the current idx runtime from memory. | built-in | | [`idx export`](/commands/docs/idx_export.md) | Persist idx state to disk. | built-in | -| [`idx files`](/commands/docs/idx_files.md) | List indexed files, or lookup a specific indexed path. | built-in | +| [`idx files`](/commands/docs/idx_files.md) | List indexed files, or fuzzy-match files by query. | built-in | | [`idx find`](/commands/docs/idx_find.md) | Search idx with fuzzy matching across files and directories by default. | built-in | | [`idx import`](/commands/docs/idx_import.md) | Import idx state from disk. | built-in | | [`idx init`](/commands/docs/idx_init.md) | Initialize the in-memory idx index for a path. | built-in | diff --git a/commands/docs/idx_dirs.md b/commands/docs/idx_dirs.md index 46e6f808a7c..5ce55328a79 100644 --- a/commands/docs/idx_dirs.md +++ b/commands/docs/idx_dirs.md @@ -2,11 +2,11 @@ title: idx dirs categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | - List indexed directories from idx state. + List indexed directories, or fuzzy-match directories by query. usage: | - List indexed directories from idx state. + List indexed directories, or fuzzy-match directories by query. editLink: false contributors: false --- @@ -14,11 +14,15 @@ contributors: false # `idx dirs` for [filesystem](/commands/categories/filesystem.md) -
List indexed directories from idx state.
+
List indexed directories, or fuzzy-match directories by query.
## Signature -```> idx dirs {flags} ``` +```> idx dirs {flags} (query)``` + +## Parameters + + - `query`: Optional fuzzy query to filter indexed directories. ## Input/output types: @@ -33,3 +37,9 @@ List all indexed directories > idx dirs ``` + +Fuzzy-match indexed directories by query +```nu +> idx dirs src + +``` diff --git a/commands/docs/idx_drop.md b/commands/docs/idx_drop.md index 35ba0641f1e..d76a0bd3f7b 100644 --- a/commands/docs/idx_drop.md +++ b/commands/docs/idx_drop.md @@ -2,7 +2,7 @@ title: idx drop categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Drop the current idx runtime from memory. usage: | diff --git a/commands/docs/idx_export.md b/commands/docs/idx_export.md index 75a61b6aae7..a64ffc9e4fe 100644 --- a/commands/docs/idx_export.md +++ b/commands/docs/idx_export.md @@ -2,7 +2,7 @@ title: idx export categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Persist idx state to disk. usage: | @@ -32,7 +32,7 @@ contributors: false | nothing | record | ## Examples -Save the current idx index to disk +Save the current idx index to disk. ```nu > idx export ~/my-index.db diff --git a/commands/docs/idx_files.md b/commands/docs/idx_files.md index d79d99cbad9..7d8f83db514 100644 --- a/commands/docs/idx_files.md +++ b/commands/docs/idx_files.md @@ -2,11 +2,11 @@ title: idx files categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | - List indexed files, or lookup a specific indexed path. + List indexed files, or fuzzy-match files by query. usage: | - List indexed files, or lookup a specific indexed path. + List indexed files, or fuzzy-match files by query. editLink: false contributors: false --- @@ -14,15 +14,15 @@ contributors: false # `idx files` for [filesystem](/commands/categories/filesystem.md) -
List indexed files, or lookup a specific indexed path.
+
List indexed files, or fuzzy-match files by query.
## Signature -```> idx files {flags} (path)``` +```> idx files {flags} (query)``` ## Parameters - - `path`: Optional path to lookup in index. + - `query`: Optional fuzzy query to filter indexed files. ## Input/output types: @@ -32,14 +32,14 @@ contributors: false | nothing | list<record> | ## Examples -List all indexed files +List all indexed files. ```nu > idx files ``` -Lookup a specific file path in the index +Fuzzy-match indexed files by query. ```nu -> idx files src/main.rs +> idx files main ``` diff --git a/commands/docs/idx_find.md b/commands/docs/idx_find.md index eea70a89491..252e5a17c3f 100644 --- a/commands/docs/idx_find.md +++ b/commands/docs/idx_find.md @@ -2,7 +2,7 @@ title: idx find categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Search idx with fuzzy matching across files and directories by default. usage: | @@ -25,7 +25,7 @@ contributors: false - `--verbose, -v`: Include verbose scoring details. - `--dirs, -d`: Search directories only. - `--files, -f`: Search files only. - - `--limit, -l {int}`: Maximum number of rows to return. + - `--limit, -l {int}`: Maximum number of rows to return (default 100). ## Parameters @@ -39,19 +39,19 @@ contributors: false | nothing | list<record> | ## Examples -Fuzzy search for files and directories matching 'main' +Fuzzy search for files and directories matching 'main'. ```nu > idx find main ``` -Search only files with verbose scoring output +Search only files with verbose scoring output. ```nu > idx find config --files --verbose ``` -Search only directories, limited to top 10 results +Search only directories, limited to top 10 results. ```nu > idx find src --dirs --limit 10 diff --git a/commands/docs/idx_import.md b/commands/docs/idx_import.md index 9c614199a12..2710a67b2f7 100644 --- a/commands/docs/idx_import.md +++ b/commands/docs/idx_import.md @@ -2,7 +2,7 @@ title: idx import categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Import idx state from disk. usage: | @@ -20,6 +20,10 @@ contributors: false ```> idx import {flags} (filepath)``` +## Flags + + - `--no-watch`: Disable filesystem watching after import (watching is enabled by default). + ## Parameters - `filepath`: Path to a stored idx snapshot. @@ -32,11 +36,11 @@ contributors: false | nothing | record | ## Examples -Restore an idx index from a snapshot on disk +Restore an idx index from a snapshot on disk. ```nu > idx import ~/my-index.db ``` ## Notes -Reads a SQLite snapshot created by `idx export` and hydrates the runtime from stored rows. Watch mode is not restored from the snapshot. \ No newline at end of file +Reads a SQLite snapshot created by `idx export` and auto-initializes idx runtime for immediate queries. \ No newline at end of file diff --git a/commands/docs/idx_init.md b/commands/docs/idx_init.md index cac761c99e8..1b9f24d1cbb 100644 --- a/commands/docs/idx_init.md +++ b/commands/docs/idx_init.md @@ -2,7 +2,7 @@ title: idx init categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Initialize the in-memory idx index for a path. usage: | @@ -23,6 +23,9 @@ contributors: false ## Flags - `--wait, -w`: Block until the initial scan completes before returning. + - `--no-watch`: Disable filesystem watching after the initial scan (watching is enabled by default). + - `--no-content-indexing`: Disable file content indexing (content indexing is enabled by default). + - `--follow-symlinks, -f`: Whether to follow symlinks when indexing. ## Parameters @@ -36,17 +39,23 @@ contributors: false | nothing | record | ## Examples -Initialize idx for the current directory +Initialize idx for the current directory. ```nu > idx init . ``` -Initialize idx and wait for the initial scan to complete +Initialize idx and wait for the initial scan to complete. ```nu > idx init . --wait ``` +Initialize idx without filesystem watching. +```nu +> idx init . --no-watch + +``` + ## Notes -By default idx init returns immediately and indexing continues in the background. Use `idx status` to check when scanning completes. Pass `--wait` to block until the initial scan finishes. \ No newline at end of file +By default idx init returns immediately and indexing continues in the background. Use `idx status` to check when scanning completes. Pass `--wait` to block until the initial scan finishes. Filesystem watching is enabled by default; pass `--no-watch` to disable it. \ No newline at end of file diff --git a/commands/docs/idx_search.md b/commands/docs/idx_search.md index 872855d11de..dc4cc37f2ab 100644 --- a/commands/docs/idx_search.md +++ b/commands/docs/idx_search.md @@ -2,7 +2,7 @@ title: idx search categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Search indexed file contents. usage: | @@ -25,6 +25,7 @@ contributors: false - `--regex, -r`: Use regular-expression matching mode. - `--fuzzy, -f`: Use fuzzy line-matching mode. - `--limit, -l {int}`: Maximum number of matches to collect. + - `--context, -c {oneof}`: The number of context lines to include before and after each match can be specified as an integer or a range. An integer sets both the before and after context to that number, while a range uses a negative value for lines before and a positive value for lines after (e.g., -3..5). ## Parameters @@ -38,23 +39,47 @@ contributors: false | nothing | list<record> | ## Examples -Search indexed file contents for a plain text pattern +Search indexed file contents for a plain text pattern. ```nu > idx search hello ``` -Search using a regular expression +Search using a regular expression. ```nu > idx search --regex 'fn \w+' ``` -Search with multiple patterns simultaneously +Search with multiple patterns simultaneously. ```nu > idx search TODO FIXME HACK ``` +Include 2 lines of context before and 5 lines after each match. +```nu +> idx search error -2..5 + +``` + +Brackets and question marks are treated as literal text, not glob patterns. +```nu +> idx search 'arr[0]' + +``` + +Glob patterns with a path separator filter which files to search. +```nu +> idx search pattern tests/* + +``` + +Brace expansion globs also filter which files to search. +```nu +> idx search pattern *.{rs,js} + +``` + ## Notes Mode selection: plain text is the default and treats each pattern literally, `--regex` evaluates the patterns as regular expressions, and `--fuzzy` performs approximate line matching. \ No newline at end of file diff --git a/commands/docs/idx_status.md b/commands/docs/idx_status.md index 4f0102d2e18..410d8f4b50f 100644 --- a/commands/docs/idx_status.md +++ b/commands/docs/idx_status.md @@ -2,7 +2,7 @@ title: idx status categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Show status information for the global in-memory idx runtime. usage: | @@ -28,7 +28,7 @@ contributors: false | nothing | record | ## Examples -Show the current idx runtime status +Show the current idx runtime status. ```nu > idx status diff --git a/commands/docs/if.md b/commands/docs/if.md index 657a02adf6c..389b8279e1c 100644 --- a/commands/docs/if.md +++ b/commands/docs/if.md @@ -2,7 +2,7 @@ title: if categories: | core -version: 0.113.0 +version: 0.114.0 core: | Conditionally run a block. usage: | diff --git a/commands/docs/ignore.md b/commands/docs/ignore.md index 9581ac8fb46..82e89575dda 100644 --- a/commands/docs/ignore.md +++ b/commands/docs/ignore.md @@ -2,11 +2,11 @@ title: ignore categories: | core -version: 0.113.0 +version: 0.114.0 core: | - Ignore the output of the previous command in the pipeline. + Ignore selected output streams from the previous command in the pipeline. usage: | - Ignore the output of the previous command in the pipeline. + Ignore selected output streams from the previous command in the pipeline. editLink: false contributors: false --- @@ -14,22 +14,46 @@ contributors: false # `ignore` for [core](/commands/categories/core.md) -
Ignore the output of the previous command in the pipeline.
+
Ignore selected output streams from the previous command in the pipeline.
## Signature ```> ignore {flags} ``` +## Flags + + - `--stderr, -e`: Consume all stderr output and allow stdout output through. + - `--stdout, -o`: Consume all stdout output and allow stderr output through. + - `--show-errors, -x`: Allow errors through and set $env.LAST_EXIT_CODE (internal failures use 1). + ## Input/output types: -| input | output | -| ----- | ------- | -| any | nothing | +| input | output | +| ----- | ------ | +| any | any | ## Examples -Ignore the output of an echo command. +Ignore all stdout output (default behavior). ```nu > echo done | ignore ``` + +Consume stderr and allow stdout through. +```nu +> echo done | ignore --stderr +done +``` + +Consume stdout while keeping stderr visible. +```nu +> $'done' | ignore --stdout + +``` + +Show internal errors and read the resulting exit code. +```nu +> try { error make {msg: 'boom'} | ignore --show-errors } catch { $env.LAST_EXIT_CODE } +1 +``` diff --git a/commands/docs/inc.md b/commands/docs/inc.md index 5b17fc694a2..44cd95ccd6b 100644 --- a/commands/docs/inc.md +++ b/commands/docs/inc.md @@ -2,7 +2,7 @@ title: inc categories: | default -version: 0.113.0 +version: 0.114.0 default: | Increment a value or version. Optionally use the column of a table. usage: | diff --git a/commands/docs/input.md b/commands/docs/input.md index 8affea8bcd8..d9eaea758be 100644 --- a/commands/docs/input.md +++ b/commands/docs/input.md @@ -2,7 +2,7 @@ title: input categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Get input from the user via the terminal. usage: | diff --git a/commands/docs/input_list.md b/commands/docs/input_list.md index 325358d4c4c..d8e01c59c2c 100644 --- a/commands/docs/input_list.md +++ b/commands/docs/input_list.md @@ -2,7 +2,7 @@ title: input list categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Display an interactive list for user selection. usage: | diff --git a/commands/docs/input_listen.md b/commands/docs/input_listen.md index 492ef23aa68..1bde52e8126 100644 --- a/commands/docs/input_listen.md +++ b/commands/docs/input_listen.md @@ -2,7 +2,7 @@ title: input listen categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Listen for user interface events. usage: | diff --git a/commands/docs/insert.md b/commands/docs/insert.md index 671845203b0..f0f0ff3139b 100644 --- a/commands/docs/insert.md +++ b/commands/docs/insert.md @@ -2,7 +2,7 @@ title: insert categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Insert a new column, using an expression or closure to create each row's values. usage: | diff --git a/commands/docs/inspect.md b/commands/docs/inspect.md index 744e9f05ef8..a949f7ef9c3 100644 --- a/commands/docs/inspect.md +++ b/commands/docs/inspect.md @@ -2,7 +2,7 @@ title: inspect categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Inspect pipeline results while running a pipeline. usage: | diff --git a/commands/docs/interleave.md b/commands/docs/interleave.md index 1b65c170012..4d4016ab76c 100644 --- a/commands/docs/interleave.md +++ b/commands/docs/interleave.md @@ -2,7 +2,7 @@ title: interleave categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Read multiple streams in parallel and combine them into one stream. usage: | diff --git a/commands/docs/intersect.md b/commands/docs/intersect.md new file mode 100644 index 00000000000..74fc8522ee7 --- /dev/null +++ b/commands/docs/intersect.md @@ -0,0 +1,65 @@ +--- +title: intersect +categories: | + filters +version: 0.114.0 +filters: | + Returns a list of unique elements present in both the input and the provided list. +usage: | + Returns a list of unique elements present in both the input and the provided list. +editLink: false +contributors: false +--- + + +# `intersect` for [filters](/commands/categories/filters.md) + +
Returns a list of unique elements present in both the input and the provided list.
+ +## Signature + +```> intersect {flags} (other)``` + +## Parameters + + - `other`: The other list to intersect with. + + +## Input/output types: + +| input | output | +| --------- | --------- | +| list<any> | list<any> | +| table | table | +## Examples + +Return the intersection of two lists +```nu +> [1 2 3 4] | intersect [3 4 5 6] +╭───┬───╮ +│ 0 │ 3 │ +│ 1 │ 4 │ +╰───┴───╯ + +``` + +Intersection with no common elements +```nu +> [1 2 3] | intersect [4 5 6] +╭────────────╮ +│ empty list │ +╰────────────╯ + +``` + +Intersection of two tables +```nu +> [{a:1} {a:2} {a:3}] | intersect [{a:2} {a:3} {a:4}] +╭───┬───╮ +│ # │ a │ +├───┼───┤ +│ 0 │ 2 │ +│ 1 │ 3 │ +╰───┴───╯ + +``` diff --git a/commands/docs/into.md b/commands/docs/into.md index 17c75c2ee18..1f7b2d06e50 100644 --- a/commands/docs/into.md +++ b/commands/docs/into.md @@ -2,7 +2,7 @@ title: into categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Commands to convert data from one type to another. usage: | @@ -31,18 +31,20 @@ You must use one of the following subcommands. Using this command as-is will onl ## Subcommands: -| name | description | type | -| ---------------------------------------------------- | ------------------------------------------ | -------- | -| [`into binary`](/commands/docs/into_binary.md) | Convert value to a binary primitive. | built-in | -| [`into bool`](/commands/docs/into_bool.md) | Convert value to a boolean. | built-in | -| [`into cell-path`](/commands/docs/into_cell-path.md) | Convert value to a cell-path. | built-in | -| [`into datetime`](/commands/docs/into_datetime.md) | Convert text or timestamp into a datetime. | built-in | -| [`into duration`](/commands/docs/into_duration.md) | Convert value to a duration. | built-in | -| [`into filesize`](/commands/docs/into_filesize.md) | Convert value to a filesize. | built-in | -| [`into float`](/commands/docs/into_float.md) | Convert data into floating point number. | built-in | -| [`into glob`](/commands/docs/into_glob.md) | Convert value to a glob pattern. | built-in | -| [`into int`](/commands/docs/into_int.md) | Convert value to an integer. | built-in | -| [`into record`](/commands/docs/into_record.md) | Convert value to a record. | built-in | -| [`into sqlite`](/commands/docs/into_sqlite.md) | Convert table into a SQLite database. | built-in | -| [`into string`](/commands/docs/into_string.md) | Convert value to a string. | built-in | -| [`into value`](/commands/docs/into_value.md) | Convert custom values into base values. | built-in | \ No newline at end of file +| name | description | type | +| ---------------------------------------------------------- | ------------------------------------------ | -------- | +| [`into binary`](/commands/docs/into_binary.md) | Convert value to a binary primitive. | built-in | +| [`into bool`](/commands/docs/into_bool.md) | Convert value to a boolean. | built-in | +| [`into cell-path`](/commands/docs/into_cell-path.md) | Convert value to a cell-path. | built-in | +| [`into datetime`](/commands/docs/into_datetime.md) | Convert text or timestamp into a datetime. | built-in | +| [`into duration`](/commands/docs/into_duration.md) | Convert value to a duration. | built-in | +| [`into filesize`](/commands/docs/into_filesize.md) | Convert value to a filesize. | built-in | +| [`into float`](/commands/docs/into_float.md) | Convert data into floating point number. | built-in | +| [`into glob`](/commands/docs/into_glob.md) | Convert value to a glob pattern. | built-in | +| [`into int`](/commands/docs/into_int.md) | Convert value to an integer. | built-in | +| [`into record`](/commands/docs/into_record.md) | Convert value to a record. | built-in | +| [`into semver`](/commands/docs/into_semver.md) | Convert a value to a semantic version. | built-in | +| [`into semver-range`](/commands/docs/into_semver-range.md) | Convert a string to a semver range. | built-in | +| [`into sqlite`](/commands/docs/into_sqlite.md) | Convert table into a SQLite database. | built-in | +| [`into string`](/commands/docs/into_string.md) | Convert value to a string. | built-in | +| [`into value`](/commands/docs/into_value.md) | Convert custom values into base values. | built-in | \ No newline at end of file diff --git a/commands/docs/into_binary.md b/commands/docs/into_binary.md index ec1d4be58bc..6aa95c62558 100644 --- a/commands/docs/into_binary.md +++ b/commands/docs/into_binary.md @@ -2,7 +2,7 @@ title: into binary categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a binary primitive. usage: | diff --git a/commands/docs/into_bool.md b/commands/docs/into_bool.md index 4ebb7db9479..9d61322a5bf 100644 --- a/commands/docs/into_bool.md +++ b/commands/docs/into_bool.md @@ -2,7 +2,7 @@ title: into bool categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a boolean. usage: | diff --git a/commands/docs/into_cell-path.md b/commands/docs/into_cell-path.md index d06c355563e..f4da650ce9f 100644 --- a/commands/docs/into_cell-path.md +++ b/commands/docs/into_cell-path.md @@ -2,7 +2,7 @@ title: into cell-path categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a cell-path. usage: | @@ -23,12 +23,12 @@ contributors: false ## Input/output types: -| input | output | -| ----------------------------------------------------------- | --------- | -| cell-path | cell-path | -| int | cell-path | -| list<any> | cell-path | -| list<record<value: any, optional: bool, insensitive: bool>> | cell-path | +| input | output | +| ---------------------------------------------------- | --------- | +| cell-path | cell-path | +| int | cell-path | +| list<any> | cell-path | +| table<value: any, optional: bool, insensitive: bool> | cell-path | ## Examples Convert integer into cell path. diff --git a/commands/docs/into_datetime.md b/commands/docs/into_datetime.md index 653cbf0218e..7952f76b439 100644 --- a/commands/docs/into_datetime.md +++ b/commands/docs/into_datetime.md @@ -2,7 +2,7 @@ title: into datetime categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert text or timestamp into a datetime. usage: | @@ -101,7 +101,7 @@ Convert list of timestamps to datetimes. ╭───┬─────────────╮ │ 0 │ 3 years ago │ │ 1 │ 3 years ago │ -│ 2 │ 2 years ago │ +│ 2 │ 3 years ago │ ╰───┴─────────────╯ ``` diff --git a/commands/docs/into_duration.md b/commands/docs/into_duration.md index 4fe9086a21c..bdd9a4924f6 100644 --- a/commands/docs/into_duration.md +++ b/commands/docs/into_duration.md @@ -2,7 +2,7 @@ title: into duration categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a duration. usage: | diff --git a/commands/docs/into_filesize.md b/commands/docs/into_filesize.md index 1b7cc606a1f..88361532872 100644 --- a/commands/docs/into_filesize.md +++ b/commands/docs/into_filesize.md @@ -2,7 +2,7 @@ title: into filesize categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a filesize. usage: | diff --git a/commands/docs/into_float.md b/commands/docs/into_float.md index 74129a9457e..3f29a831b2f 100644 --- a/commands/docs/into_float.md +++ b/commands/docs/into_float.md @@ -2,7 +2,7 @@ title: into float categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert data into floating point number. usage: | diff --git a/commands/docs/into_glob.md b/commands/docs/into_glob.md index a6f67bb8d06..75d9c6956d9 100644 --- a/commands/docs/into_glob.md +++ b/commands/docs/into_glob.md @@ -2,7 +2,7 @@ title: into glob categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a glob pattern. usage: | diff --git a/commands/docs/into_int.md b/commands/docs/into_int.md index 18e67cdc715..4f38489b436 100644 --- a/commands/docs/into_int.md +++ b/commands/docs/into_int.md @@ -2,7 +2,7 @@ title: into int categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to an integer. usage: | diff --git a/commands/docs/into_record.md b/commands/docs/into_record.md index 5e820dd8707..9ffbbd95bff 100644 --- a/commands/docs/into_record.md +++ b/commands/docs/into_record.md @@ -2,7 +2,7 @@ title: into record categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a record. usage: | diff --git a/commands/docs/into_semver-range.md b/commands/docs/into_semver-range.md new file mode 100644 index 00000000000..0ef6362d546 --- /dev/null +++ b/commands/docs/into_semver-range.md @@ -0,0 +1,42 @@ +--- +title: into semver-range +categories: | + conversions +version: 0.114.0 +conversions: | + Convert a string to a semver range. +usage: | + Convert a string to a semver range. +editLink: false +contributors: false +--- + + +# `into semver-range` for [conversions](/commands/categories/conversions.md) + +
Convert a string to a semver range.
+ +## Signature + +```> into semver-range {flags} ``` + + +## Input/output types: + +| input | output | +| ------------ | ------------ | +| string | semver-range | +| semver-range | semver-range | +## Examples + +Convert a string to a semver range +```nu +> '>=1.0.0' | into semver-range + +``` + +Convert a complex range +```nu +> '^1.2.3' | into semver-range + +``` diff --git a/commands/docs/into_semver.md b/commands/docs/into_semver.md new file mode 100644 index 00000000000..a1f16d0efd3 --- /dev/null +++ b/commands/docs/into_semver.md @@ -0,0 +1,49 @@ +--- +title: into semver +categories: | + conversions +version: 0.114.0 +conversions: | + Convert a value to a semantic version. +usage: | + Convert a value to a semantic version. +editLink: false +contributors: false +--- + + +# `into semver` for [conversions](/commands/categories/conversions.md) + +
Convert a value to a semantic version.
+ +## Signature + +```> into semver {flags} ``` + + +## Input/output types: + +| input | output | +| ------ | ------ | +| string | semver | +| semver | semver | +| record | semver | +## Examples + +Convert a string to a semver value +```nu +> '1.2.3' | into semver + +``` + +Convert a string with prerelease +```nu +> '1.2.3-alpha.1+build.2' | into semver + +``` + +Convert a record to a semver value +```nu +> {major: 1, minor: 2, patch: 3} | into semver + +``` diff --git a/commands/docs/into_sqlite.md b/commands/docs/into_sqlite.md index d589e0dbaf7..4d297139caf 100644 --- a/commands/docs/into_sqlite.md +++ b/commands/docs/into_sqlite.md @@ -2,7 +2,7 @@ title: into sqlite categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert table into a SQLite database. usage: | diff --git a/commands/docs/into_string.md b/commands/docs/into_string.md index 7303d1d4761..38183ed54b4 100644 --- a/commands/docs/into_string.md +++ b/commands/docs/into_string.md @@ -2,7 +2,7 @@ title: into string categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert value to a string. usage: | diff --git a/commands/docs/into_value.md b/commands/docs/into_value.md index ee26d1512ca..e6cb3701241 100644 --- a/commands/docs/into_value.md +++ b/commands/docs/into_value.md @@ -2,7 +2,7 @@ title: into value categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Convert custom values into base values. usage: | diff --git a/commands/docs/is-admin.md b/commands/docs/is-admin.md index 65d6ccb9d09..6ec6b51ae9d 100644 --- a/commands/docs/is-admin.md +++ b/commands/docs/is-admin.md @@ -2,7 +2,7 @@ title: is-admin categories: | core -version: 0.113.0 +version: 0.114.0 core: | Check if nushell is running with administrator or root privileges. usage: | diff --git a/commands/docs/is-empty.md b/commands/docs/is-empty.md index 5527b3ffa8a..55973e69846 100644 --- a/commands/docs/is-empty.md +++ b/commands/docs/is-empty.md @@ -2,7 +2,7 @@ title: is-empty categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Check for empty values. usage: | diff --git a/commands/docs/is-not-empty.md b/commands/docs/is-not-empty.md index f26a4e12c60..4f998658fb5 100644 --- a/commands/docs/is-not-empty.md +++ b/commands/docs/is-not-empty.md @@ -2,7 +2,7 @@ title: is-not-empty categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Check for non-empty values. usage: | diff --git a/commands/docs/is-terminal.md b/commands/docs/is-terminal.md index 66e89124eac..1ca60ecbe26 100644 --- a/commands/docs/is-terminal.md +++ b/commands/docs/is-terminal.md @@ -2,7 +2,7 @@ title: is-terminal categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Check if stdin, stdout, or stderr is a terminal. usage: | @@ -34,6 +34,24 @@ contributors: false | nothing | bool | ## Examples +Check if stdout is a terminal (default when no flag is specified). +```nu +> is-terminal + +``` + +Return false when output is piped to another command. +```nu +> is-terminal | to text +false +``` + +Return false when output is collected into a variable. +```nu +> let x = (is-terminal); $x +false +``` + Return "terminal attached" if standard input is attached to a terminal, and "no terminal" if not. ```nu > if (is-terminal --stdin) { "terminal attached" } else { "no terminal" } diff --git a/commands/docs/items.md b/commands/docs/items.md index c6cb5e9a065..b6ba44a20fb 100644 --- a/commands/docs/items.md +++ b/commands/docs/items.md @@ -2,7 +2,7 @@ title: items categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Given a record, iterate on each pair of column name and associated value. usage: | diff --git a/commands/docs/job.md b/commands/docs/job.md index 81ace15cdde..02ba03c357b 100644 --- a/commands/docs/job.md +++ b/commands/docs/job.md @@ -2,7 +2,7 @@ title: job categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Various commands for working with background jobs. usage: | diff --git a/commands/docs/job_describe.md b/commands/docs/job_describe.md index 5e1e075d07f..1b9168fe9e4 100644 --- a/commands/docs/job_describe.md +++ b/commands/docs/job_describe.md @@ -2,7 +2,7 @@ title: job describe categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Add a description to a background job. usage: | diff --git a/commands/docs/job_flush.md b/commands/docs/job_flush.md index 50773854b93..a6bb59cb799 100644 --- a/commands/docs/job_flush.md +++ b/commands/docs/job_flush.md @@ -2,7 +2,7 @@ title: job flush categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Clear this job's mailbox. usage: | diff --git a/commands/docs/job_id.md b/commands/docs/job_id.md index b6470467329..f631dd87484 100644 --- a/commands/docs/job_id.md +++ b/commands/docs/job_id.md @@ -2,7 +2,7 @@ title: job id categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Get id of current job. usage: | diff --git a/commands/docs/job_kill.md b/commands/docs/job_kill.md index 8d4252d41ba..99702bc6bf1 100644 --- a/commands/docs/job_kill.md +++ b/commands/docs/job_kill.md @@ -2,7 +2,7 @@ title: job kill categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Kill a background job. usage: | diff --git a/commands/docs/job_list.md b/commands/docs/job_list.md index 8a4e02bddbe..359dfe8d913 100644 --- a/commands/docs/job_list.md +++ b/commands/docs/job_list.md @@ -2,7 +2,7 @@ title: job list categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | List background jobs. usage: | diff --git a/commands/docs/job_recv.md b/commands/docs/job_recv.md index c4dda1e5ed8..f99b543d55f 100644 --- a/commands/docs/job_recv.md +++ b/commands/docs/job_recv.md @@ -2,7 +2,7 @@ title: job recv categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Read a message from a job's mailbox. usage: | diff --git a/commands/docs/job_send.md b/commands/docs/job_send.md index d63dab0db87..a81cb038a9a 100644 --- a/commands/docs/job_send.md +++ b/commands/docs/job_send.md @@ -2,7 +2,7 @@ title: job send categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Send a message to the mailbox of a job. usage: | diff --git a/commands/docs/job_spawn.md b/commands/docs/job_spawn.md index d5df3e09b4a..bf179345b3b 100644 --- a/commands/docs/job_spawn.md +++ b/commands/docs/job_spawn.md @@ -2,7 +2,7 @@ title: job spawn categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Spawn a background job and retrieve its ID. usage: | diff --git a/commands/docs/job_unfreeze.md b/commands/docs/job_unfreeze.md index e51502d9fbf..aef58efbcf8 100644 --- a/commands/docs/job_unfreeze.md +++ b/commands/docs/job_unfreeze.md @@ -2,7 +2,7 @@ title: job unfreeze categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Unfreeze a frozen process job in foreground. usage: | diff --git a/commands/docs/join.md b/commands/docs/join.md index 07e4ae38730..16b8c2c1022 100644 --- a/commands/docs/join.md +++ b/commands/docs/join.md @@ -2,7 +2,7 @@ title: join categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Join two tables. usage: | diff --git a/commands/docs/keybindings.md b/commands/docs/keybindings.md index b8074f66313..e311cac3926 100644 --- a/commands/docs/keybindings.md +++ b/commands/docs/keybindings.md @@ -2,7 +2,7 @@ title: keybindings categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Keybindings related commands. usage: | diff --git a/commands/docs/keybindings_default.md b/commands/docs/keybindings_default.md index dc068985999..794a9c871d0 100644 --- a/commands/docs/keybindings_default.md +++ b/commands/docs/keybindings_default.md @@ -2,7 +2,7 @@ title: keybindings default categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | List default keybindings. usage: | diff --git a/commands/docs/keybindings_list.md b/commands/docs/keybindings_list.md index 5a24579c424..f6b78d04b5e 100644 --- a/commands/docs/keybindings_list.md +++ b/commands/docs/keybindings_list.md @@ -2,7 +2,7 @@ title: keybindings list categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | List available options that can be used to create keybindings. usage: | diff --git a/commands/docs/keybindings_listen.md b/commands/docs/keybindings_listen.md index bf087798741..81a559d802d 100644 --- a/commands/docs/keybindings_listen.md +++ b/commands/docs/keybindings_listen.md @@ -2,7 +2,7 @@ title: keybindings listen categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Get input from the user. usage: | diff --git a/commands/docs/kill.md b/commands/docs/kill.md index 516efea7052..e947bc6d233 100644 --- a/commands/docs/kill.md +++ b/commands/docs/kill.md @@ -2,7 +2,7 @@ title: kill categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Kill a process using its process ID. usage: | diff --git a/commands/docs/last.md b/commands/docs/last.md index a045ed1ac44..3dda0b89cf5 100644 --- a/commands/docs/last.md +++ b/commands/docs/last.md @@ -2,7 +2,7 @@ title: last categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Return only the last several rows of the input. Counterpart of `first`. Opposite of `drop`. usage: | diff --git a/commands/docs/length.md b/commands/docs/length.md index 77cf7dabf47..1b1e22cbe14 100644 --- a/commands/docs/length.md +++ b/commands/docs/length.md @@ -2,7 +2,7 @@ title: length categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Count the number of items in an input list, rows in a table, or bytes in binary data. usage: | diff --git a/commands/docs/let-env.md b/commands/docs/let-env.md index 573df780207..0cce8162b0f 100644 --- a/commands/docs/let-env.md +++ b/commands/docs/let-env.md @@ -2,7 +2,7 @@ title: let-env categories: | removed -version: 0.113.0 +version: 0.114.0 removed: | `let-env FOO = ...` has been removed, use `$env.FOO = ...` instead. usage: | diff --git a/commands/docs/let.md b/commands/docs/let.md index cfe143b801d..d2505745459 100644 --- a/commands/docs/let.md +++ b/commands/docs/let.md @@ -2,7 +2,7 @@ title: let categories: | core -version: 0.113.0 +version: 0.114.0 core: | Create a variable and give it a value. usage: | diff --git a/commands/docs/lines.md b/commands/docs/lines.md index c916584287a..dcfb8eef7b1 100644 --- a/commands/docs/lines.md +++ b/commands/docs/lines.md @@ -2,7 +2,7 @@ title: lines categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Converts input to lines. usage: | @@ -23,6 +23,7 @@ contributors: false ## Flags - `--skip-empty, -s`: Skip empty lines. + - `--strict`: Validate UTF-8 strictly. ## Input/output types: diff --git a/commands/docs/load-env.md b/commands/docs/load-env.md index 19c0c8371bb..b67085888da 100644 --- a/commands/docs/load-env.md +++ b/commands/docs/load-env.md @@ -2,7 +2,7 @@ title: load-env categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Loads an environment update from a record. usage: | diff --git a/commands/docs/loop.md b/commands/docs/loop.md index 9a774a0ebe7..5ff024f70f3 100644 --- a/commands/docs/loop.md +++ b/commands/docs/loop.md @@ -2,7 +2,7 @@ title: loop categories: | core -version: 0.113.0 +version: 0.114.0 core: | Run a block in a loop. usage: | diff --git a/commands/docs/ls.md b/commands/docs/ls.md index b6c0411fd4e..fc7fa8810bc 100644 --- a/commands/docs/ls.md +++ b/commands/docs/ls.md @@ -2,7 +2,7 @@ title: ls categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | List the filenames, sizes, and modification times of items in a directory. usage: | diff --git a/commands/docs/match.md b/commands/docs/match.md index c22fde9623c..c7c41d3b93b 100644 --- a/commands/docs/match.md +++ b/commands/docs/match.md @@ -2,7 +2,7 @@ title: match categories: | core -version: 0.113.0 +version: 0.114.0 core: | Conditionally run a block on a matched value. usage: | diff --git a/commands/docs/math.md b/commands/docs/math.md index f4e5350017b..ca278fab359 100644 --- a/commands/docs/math.md +++ b/commands/docs/math.md @@ -2,7 +2,7 @@ title: math categories: | math -version: 0.113.0 +version: 0.114.0 math: | Use mathematical functions as aggregate functions on a list of numbers or tables. usage: | @@ -41,6 +41,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`math arctan`](/commands/docs/math_arctan.md) | Returns the arctangent of the number. | built-in | | [`math arctanh`](/commands/docs/math_arctanh.md) | Returns the inverse of the hyperbolic tangent function. | built-in | | [`math avg`](/commands/docs/math_avg.md) | Returns the average of a list of numbers. | built-in | +| [`math cbrt`](/commands/docs/math_cbrt.md) | Returns the real-valued cube root of the input number. | built-in | | [`math ceil`](/commands/docs/math_ceil.md) | Returns the ceil of a number (smallest integer greater than or equal to that number). | built-in | | [`math cos`](/commands/docs/math_cos.md) | Returns the cosine of the number. | built-in | | [`math cosh`](/commands/docs/math_cosh.md) | Returns the hyperbolic cosine of the number. | built-in | diff --git a/commands/docs/math_abs.md b/commands/docs/math_abs.md index c0d846adac9..ca219ad26c8 100644 --- a/commands/docs/math_abs.md +++ b/commands/docs/math_abs.md @@ -2,7 +2,7 @@ title: math abs categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the absolute value of a number. usage: | diff --git a/commands/docs/math_arccos.md b/commands/docs/math_arccos.md index 5147ab0ea15..584098277a3 100644 --- a/commands/docs/math_arccos.md +++ b/commands/docs/math_arccos.md @@ -2,7 +2,7 @@ title: math arccos categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the arccosine of the number. usage: | diff --git a/commands/docs/math_arccosh.md b/commands/docs/math_arccosh.md index afe5294e076..03829b586f3 100644 --- a/commands/docs/math_arccosh.md +++ b/commands/docs/math_arccosh.md @@ -2,7 +2,7 @@ title: math arccosh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the inverse of the hyperbolic cosine function. usage: | diff --git a/commands/docs/math_arcsin.md b/commands/docs/math_arcsin.md index aa3e83a5405..59554d99287 100644 --- a/commands/docs/math_arcsin.md +++ b/commands/docs/math_arcsin.md @@ -2,7 +2,7 @@ title: math arcsin categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the arcsine of the number. usage: | diff --git a/commands/docs/math_arcsinh.md b/commands/docs/math_arcsinh.md index b7c5f3a32b7..5e9dc6fd156 100644 --- a/commands/docs/math_arcsinh.md +++ b/commands/docs/math_arcsinh.md @@ -2,7 +2,7 @@ title: math arcsinh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the inverse of the hyperbolic sine function. usage: | diff --git a/commands/docs/math_arctan.md b/commands/docs/math_arctan.md index 17f5758781e..bee7f29b011 100644 --- a/commands/docs/math_arctan.md +++ b/commands/docs/math_arctan.md @@ -2,7 +2,7 @@ title: math arctan categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the arctangent of the number. usage: | diff --git a/commands/docs/math_arctanh.md b/commands/docs/math_arctanh.md index 0fc08b263d1..fde57dc20de 100644 --- a/commands/docs/math_arctanh.md +++ b/commands/docs/math_arctanh.md @@ -2,7 +2,7 @@ title: math arctanh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the inverse of the hyperbolic tangent function. usage: | diff --git a/commands/docs/math_avg.md b/commands/docs/math_avg.md index 490134beda2..b2ab1ae328a 100644 --- a/commands/docs/math_avg.md +++ b/commands/docs/math_avg.md @@ -2,7 +2,7 @@ title: math avg categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the average of a list of numbers. usage: | diff --git a/commands/docs/math_cbrt.md b/commands/docs/math_cbrt.md new file mode 100644 index 00000000000..b88bd1402fb --- /dev/null +++ b/commands/docs/math_cbrt.md @@ -0,0 +1,41 @@ +--- +title: math cbrt +categories: | + math +version: 0.114.0 +math: | + Returns the real-valued cube root of the input number. +usage: | + Returns the real-valued cube root of the input number. +editLink: false +contributors: false +--- + + +# `math cbrt` for [math](/commands/categories/math.md) + +
Returns the real-valued cube root of the input number.
+ +## Signature + +```> math cbrt {flags} ``` + + +## Input/output types: + +| input | output | +| ------------ | ------------ | +| number | float | +| list<number> | list<float> | +| range | list<number> | +## Examples + +Compute the cube root of each number in a list. +```nu +> [8 -27] | math cbrt +╭───┬───────╮ +│ 0 │ 2.00 │ +│ 1 │ -3.00 │ +╰───┴───────╯ + +``` diff --git a/commands/docs/math_ceil.md b/commands/docs/math_ceil.md index 17a9a791a8b..b4a95cf3806 100644 --- a/commands/docs/math_ceil.md +++ b/commands/docs/math_ceil.md @@ -2,7 +2,7 @@ title: math ceil categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the ceil of a number (smallest integer greater than or equal to that number). usage: | diff --git a/commands/docs/math_cos.md b/commands/docs/math_cos.md index 8a2e0d41269..e02b55025a4 100644 --- a/commands/docs/math_cos.md +++ b/commands/docs/math_cos.md @@ -2,7 +2,7 @@ title: math cos categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the cosine of the number. usage: | diff --git a/commands/docs/math_cosh.md b/commands/docs/math_cosh.md index 49e4c5752d1..a781ce614ab 100644 --- a/commands/docs/math_cosh.md +++ b/commands/docs/math_cosh.md @@ -2,7 +2,7 @@ title: math cosh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the hyperbolic cosine of the number. usage: | diff --git a/commands/docs/math_exp.md b/commands/docs/math_exp.md index df6fd2f13e9..0b12f7cf40a 100644 --- a/commands/docs/math_exp.md +++ b/commands/docs/math_exp.md @@ -2,7 +2,7 @@ title: math exp categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns e raised to the power of x. usage: | diff --git a/commands/docs/math_floor.md b/commands/docs/math_floor.md index 019ed3df943..22b94c78523 100644 --- a/commands/docs/math_floor.md +++ b/commands/docs/math_floor.md @@ -2,7 +2,7 @@ title: math floor categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the floor of a number (largest integer less than or equal to that number). usage: | diff --git a/commands/docs/math_ln.md b/commands/docs/math_ln.md index 1f3756dcab3..f20d688f959 100644 --- a/commands/docs/math_ln.md +++ b/commands/docs/math_ln.md @@ -2,7 +2,7 @@ title: math ln categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the natural logarithm. Base: (math e). usage: | diff --git a/commands/docs/math_log.md b/commands/docs/math_log.md index 6f657f0cf3c..88b9439fe59 100644 --- a/commands/docs/math_log.md +++ b/commands/docs/math_log.md @@ -2,7 +2,7 @@ title: math log categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the logarithm for an arbitrary base. usage: | diff --git a/commands/docs/math_max.md b/commands/docs/math_max.md index e288ee2021b..39dded1aa16 100644 --- a/commands/docs/math_max.md +++ b/commands/docs/math_max.md @@ -2,7 +2,7 @@ title: math max categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the maximum of a list of values, or of columns in a table. usage: | diff --git a/commands/docs/math_median.md b/commands/docs/math_median.md index 218ae18c151..e7f5ff8db2b 100644 --- a/commands/docs/math_median.md +++ b/commands/docs/math_median.md @@ -2,7 +2,7 @@ title: math median categories: | math -version: 0.113.0 +version: 0.114.0 math: | Computes the median of a list of numbers. usage: | diff --git a/commands/docs/math_min.md b/commands/docs/math_min.md index 30a18aba3d3..0ba2d633da1 100644 --- a/commands/docs/math_min.md +++ b/commands/docs/math_min.md @@ -2,7 +2,7 @@ title: math min categories: | math -version: 0.113.0 +version: 0.114.0 math: | Finds the minimum within a list of values or tables. usage: | diff --git a/commands/docs/math_mode.md b/commands/docs/math_mode.md index 4f3f43c2f04..ca5b05bb415 100644 --- a/commands/docs/math_mode.md +++ b/commands/docs/math_mode.md @@ -2,7 +2,7 @@ title: math mode categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the most frequent element(s) from a list of numbers or tables. usage: | diff --git a/commands/docs/math_product.md b/commands/docs/math_product.md index 2fadef2385c..ca935a6c400 100644 --- a/commands/docs/math_product.md +++ b/commands/docs/math_product.md @@ -2,7 +2,7 @@ title: math product categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the product of a list of numbers or the products of each column of a table. usage: | diff --git a/commands/docs/math_round.md b/commands/docs/math_round.md index f630ca5f084..e4e3b1f9ab1 100644 --- a/commands/docs/math_round.md +++ b/commands/docs/math_round.md @@ -2,7 +2,7 @@ title: math round categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the input number rounded to the specified precision. usage: | diff --git a/commands/docs/math_sin.md b/commands/docs/math_sin.md index e007490e096..01b9449ebbb 100644 --- a/commands/docs/math_sin.md +++ b/commands/docs/math_sin.md @@ -2,7 +2,7 @@ title: math sin categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the sine of the number. usage: | diff --git a/commands/docs/math_sinh.md b/commands/docs/math_sinh.md index a83b08d0551..459bb179ed3 100644 --- a/commands/docs/math_sinh.md +++ b/commands/docs/math_sinh.md @@ -2,7 +2,7 @@ title: math sinh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the hyperbolic sine of the number. usage: | diff --git a/commands/docs/math_sqrt.md b/commands/docs/math_sqrt.md index 74361608243..19e04809b55 100644 --- a/commands/docs/math_sqrt.md +++ b/commands/docs/math_sqrt.md @@ -2,7 +2,7 @@ title: math sqrt categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the square root of the input number. usage: | diff --git a/commands/docs/math_stddev.md b/commands/docs/math_stddev.md index 99b61c5cb3e..9181e9aede2 100644 --- a/commands/docs/math_stddev.md +++ b/commands/docs/math_stddev.md @@ -2,7 +2,7 @@ title: math stddev categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the standard deviation of a list of numbers, or of each column in a table. usage: | diff --git a/commands/docs/math_sum.md b/commands/docs/math_sum.md index 6789e90f0a3..97001903c71 100644 --- a/commands/docs/math_sum.md +++ b/commands/docs/math_sum.md @@ -2,7 +2,7 @@ title: math sum categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the sum of a list of numbers or of each column in a table. usage: | diff --git a/commands/docs/math_tan.md b/commands/docs/math_tan.md index 7a468d13937..5737ae87d9c 100644 --- a/commands/docs/math_tan.md +++ b/commands/docs/math_tan.md @@ -2,7 +2,7 @@ title: math tan categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the tangent of the number. usage: | diff --git a/commands/docs/math_tanh.md b/commands/docs/math_tanh.md index 88168424366..b7d14e3ed4b 100644 --- a/commands/docs/math_tanh.md +++ b/commands/docs/math_tanh.md @@ -2,7 +2,7 @@ title: math tanh categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the hyperbolic tangent of the number. usage: | diff --git a/commands/docs/math_variance.md b/commands/docs/math_variance.md index 49a1cd2c7f0..b4b6a498b18 100644 --- a/commands/docs/math_variance.md +++ b/commands/docs/math_variance.md @@ -2,7 +2,7 @@ title: math variance categories: | math -version: 0.113.0 +version: 0.114.0 math: | Returns the variance of a list of numbers or of each column in a table. usage: | diff --git a/commands/docs/merge.md b/commands/docs/merge.md index 3afdead013e..958ee96d8a2 100644 --- a/commands/docs/merge.md +++ b/commands/docs/merge.md @@ -2,7 +2,7 @@ title: merge categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Merge the input with a record or table, overwriting values in matching columns. usage: | diff --git a/commands/docs/merge_deep.md b/commands/docs/merge_deep.md index 7a325894d76..e3f69daf54c 100644 --- a/commands/docs/merge_deep.md +++ b/commands/docs/merge_deep.md @@ -2,7 +2,7 @@ title: merge deep categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Merge the input with a record or table, recursively merging values in matching columns. usage: | diff --git a/commands/docs/metadata.md b/commands/docs/metadata.md index 7029942764d..e2a39924529 100644 --- a/commands/docs/metadata.md +++ b/commands/docs/metadata.md @@ -2,7 +2,7 @@ title: metadata categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Get the metadata for items in the stream. usage: | diff --git a/commands/docs/metadata_access.md b/commands/docs/metadata_access.md index 341549ec8a2..0f277b8d9a5 100644 --- a/commands/docs/metadata_access.md +++ b/commands/docs/metadata_access.md @@ -2,7 +2,7 @@ title: metadata access categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Access the metadata for the input stream within a closure. usage: | diff --git a/commands/docs/metadata_set.md b/commands/docs/metadata_set.md index da6a8c97b35..7acb378c673 100644 --- a/commands/docs/metadata_set.md +++ b/commands/docs/metadata_set.md @@ -2,7 +2,7 @@ title: metadata set categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Set the metadata for items in the stream. usage: | @@ -25,6 +25,7 @@ contributors: false - `--datasource-filepath, -f {path}`: Assign the DataSource::FilePath metadata to the input. - `--path-columns, -p {list}`: A list of columns in the input for which path metadata will be assigned. - `--content-type, -c {oneof}`: Assign content type metadata to the input. + - `--table-width-priority-columns, -w {list}`: A list of columns to prioritize during table width allocation. ## Parameters @@ -67,3 +68,9 @@ Set metadata using a closure. > "data" | metadata set --content-type "text/csv" | metadata set {|m| $m | update content_type {$in + "-processed"}} | metadata | get content_type text/csv-processed ``` + +Set table width-priority columns metadata. +```nu +> "data" | metadata set --table-width-priority-columns [command virtual] | metadata | get table_width_priority_columns | str join "," +command,virtual +``` diff --git a/commands/docs/mkdir.md b/commands/docs/mkdir.md index 1a686fc6744..a83c6162286 100644 --- a/commands/docs/mkdir.md +++ b/commands/docs/mkdir.md @@ -2,7 +2,7 @@ title: mkdir categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Create directories, with intermediary directories if required using uutils/coreutils mkdir. usage: | diff --git a/commands/docs/mktemp.md b/commands/docs/mktemp.md index 3724575e647..a14eb96f2c6 100644 --- a/commands/docs/mktemp.md +++ b/commands/docs/mktemp.md @@ -2,7 +2,7 @@ title: mktemp categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Create temporary files or directories using uutils/coreutils mktemp. usage: | diff --git a/commands/docs/module.md b/commands/docs/module.md index e5d7113e37d..fc0f2fc6f65 100644 --- a/commands/docs/module.md +++ b/commands/docs/module.md @@ -2,7 +2,7 @@ title: module categories: | core -version: 0.113.0 +version: 0.114.0 core: | Define a custom module. usage: | diff --git a/commands/docs/move.md b/commands/docs/move.md index d253de1f252..4d0dd0ff62d 100644 --- a/commands/docs/move.md +++ b/commands/docs/move.md @@ -2,7 +2,7 @@ title: move categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Moves columns relative to other columns or make them the first/last columns. Flags are mutually exclusive. usage: | diff --git a/commands/docs/mut.md b/commands/docs/mut.md index 8b2f80e467f..b2523f55309 100644 --- a/commands/docs/mut.md +++ b/commands/docs/mut.md @@ -2,7 +2,7 @@ title: mut categories: | core -version: 0.113.0 +version: 0.114.0 core: | Create a mutable variable and give it a value. usage: | diff --git a/commands/docs/mv.md b/commands/docs/mv.md index 11e2bf7acd9..2391e6c57b0 100644 --- a/commands/docs/mv.md +++ b/commands/docs/mv.md @@ -2,7 +2,7 @@ title: mv categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Move files or directories using uutils/coreutils mv. usage: | diff --git a/commands/docs/nu-check.md b/commands/docs/nu-check.md index 13ac9e95b4a..d9567a3178f 100644 --- a/commands/docs/nu-check.md +++ b/commands/docs/nu-check.md @@ -2,7 +2,7 @@ title: nu-check categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Validate and parse Nushell input content. usage: | diff --git a/commands/docs/nu-highlight.md b/commands/docs/nu-highlight.md index dd5b91dd767..07908f86e74 100644 --- a/commands/docs/nu-highlight.md +++ b/commands/docs/nu-highlight.md @@ -2,7 +2,7 @@ title: nu-highlight categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Syntax highlight the input string. usage: | diff --git a/commands/docs/open.md b/commands/docs/open.md index 5ff3a3ff384..cabe6761480 100644 --- a/commands/docs/open.md +++ b/commands/docs/open.md @@ -2,7 +2,7 @@ title: open categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Load a file into a cell, converting to table if possible (avoid by appending '--raw'). usage: | diff --git a/commands/docs/overlay.md b/commands/docs/overlay.md index 7a559e0403b..f92279f9d8d 100644 --- a/commands/docs/overlay.md +++ b/commands/docs/overlay.md @@ -2,7 +2,7 @@ title: overlay categories: | core -version: 0.113.0 +version: 0.114.0 core: | Commands for manipulating overlays. usage: | diff --git a/commands/docs/overlay_hide.md b/commands/docs/overlay_hide.md index a7b8aae375f..c5e60232b8b 100644 --- a/commands/docs/overlay_hide.md +++ b/commands/docs/overlay_hide.md @@ -2,7 +2,7 @@ title: overlay hide categories: | core -version: 0.113.0 +version: 0.114.0 core: | Hide an active overlay. usage: | diff --git a/commands/docs/overlay_list.md b/commands/docs/overlay_list.md index bfbb3bb8b9f..c8594470f54 100644 --- a/commands/docs/overlay_list.md +++ b/commands/docs/overlay_list.md @@ -2,7 +2,7 @@ title: overlay list categories: | core -version: 0.113.0 +version: 0.114.0 core: | List all overlays with their active status. usage: | diff --git a/commands/docs/overlay_new.md b/commands/docs/overlay_new.md index b1fe93774e1..44eb3b37e84 100644 --- a/commands/docs/overlay_new.md +++ b/commands/docs/overlay_new.md @@ -2,7 +2,7 @@ title: overlay new categories: | core -version: 0.113.0 +version: 0.114.0 core: | Create an empty overlay. usage: | diff --git a/commands/docs/overlay_use.md b/commands/docs/overlay_use.md index 03c02380e2f..6565b9dd083 100644 --- a/commands/docs/overlay_use.md +++ b/commands/docs/overlay_use.md @@ -2,7 +2,7 @@ title: overlay use categories: | core -version: 0.113.0 +version: 0.114.0 core: | Use definitions from a module as an overlay. usage: | diff --git a/commands/docs/panic.md b/commands/docs/panic.md index 174807657c6..733be65d717 100644 --- a/commands/docs/panic.md +++ b/commands/docs/panic.md @@ -2,7 +2,7 @@ title: panic categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Causes nushell to panic. usage: | diff --git a/commands/docs/par-each.md b/commands/docs/par-each.md index 47cb1bbd72b..3e8dda8d441 100644 --- a/commands/docs/par-each.md +++ b/commands/docs/par-each.md @@ -2,7 +2,7 @@ title: par-each categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Run a closure on each row of the input list in parallel, creating a new list with the results. usage: | diff --git a/commands/docs/parse.md b/commands/docs/parse.md index 8040285c909..bf0d71feee1 100644 --- a/commands/docs/parse.md +++ b/commands/docs/parse.md @@ -2,7 +2,7 @@ title: parse categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Parse columns from string data using a simple pattern or a supplied regular expression. usage: | diff --git a/commands/docs/path.md b/commands/docs/path.md index 5ece58e7e57..90414d25c80 100644 --- a/commands/docs/path.md +++ b/commands/docs/path.md @@ -2,7 +2,7 @@ title: path categories: | path -version: 0.113.0 +version: 0.114.0 path: | Explore and manipulate paths. usage: | diff --git a/commands/docs/path_basename.md b/commands/docs/path_basename.md index c548c655fc3..88f17549338 100644 --- a/commands/docs/path_basename.md +++ b/commands/docs/path_basename.md @@ -2,7 +2,7 @@ title: path basename categories: | path -version: 0.113.0 +version: 0.114.0 path: | Get the final component of a path. usage: | diff --git a/commands/docs/path_dirname.md b/commands/docs/path_dirname.md index 6b675264695..371d1b1f9e7 100644 --- a/commands/docs/path_dirname.md +++ b/commands/docs/path_dirname.md @@ -2,7 +2,7 @@ title: path dirname categories: | path -version: 0.113.0 +version: 0.114.0 path: | Get the parent directory of a path. usage: | diff --git a/commands/docs/path_exists.md b/commands/docs/path_exists.md index e42c52e1bd8..dced85bdd56 100644 --- a/commands/docs/path_exists.md +++ b/commands/docs/path_exists.md @@ -2,7 +2,7 @@ title: path exists categories: | path -version: 0.113.0 +version: 0.114.0 path: | Check whether a path exists. usage: | diff --git a/commands/docs/path_expand.md b/commands/docs/path_expand.md index 17d6f05f45b..68c2b1b985d 100644 --- a/commands/docs/path_expand.md +++ b/commands/docs/path_expand.md @@ -2,7 +2,7 @@ title: path expand categories: | path -version: 0.113.0 +version: 0.114.0 path: | Try to expand a path to its absolute form. usage: | diff --git a/commands/docs/path_join.md b/commands/docs/path_join.md index 5d0c37cf806..c2bbbaf5109 100644 --- a/commands/docs/path_join.md +++ b/commands/docs/path_join.md @@ -2,7 +2,7 @@ title: path join categories: | path -version: 0.113.0 +version: 0.114.0 path: | Join a structured path or a list of path parts. usage: | diff --git a/commands/docs/path_parse.md b/commands/docs/path_parse.md index 8c1cfde6ddf..dec6fa9b7f6 100644 --- a/commands/docs/path_parse.md +++ b/commands/docs/path_parse.md @@ -2,7 +2,7 @@ title: path parse categories: | path -version: 0.113.0 +version: 0.114.0 path: | Convert a path into structured data. usage: | diff --git a/commands/docs/path_relative-to.md b/commands/docs/path_relative-to.md index 67a2aa61902..c2f3dee04df 100644 --- a/commands/docs/path_relative-to.md +++ b/commands/docs/path_relative-to.md @@ -2,7 +2,7 @@ title: path relative-to categories: | path -version: 0.113.0 +version: 0.114.0 path: | Express a path as relative to another path. usage: | diff --git a/commands/docs/path_self.md b/commands/docs/path_self.md index 6bc4a5ceccd..c52a1148b5f 100644 --- a/commands/docs/path_self.md +++ b/commands/docs/path_self.md @@ -2,7 +2,7 @@ title: path self categories: | path -version: 0.113.0 +version: 0.114.0 path: | Get the absolute path of the script or module containing this command at parse time. usage: | diff --git a/commands/docs/path_split.md b/commands/docs/path_split.md index 03dbd9dea70..e82f5ba4cf4 100644 --- a/commands/docs/path_split.md +++ b/commands/docs/path_split.md @@ -2,7 +2,7 @@ title: path split categories: | path -version: 0.113.0 +version: 0.114.0 path: | Split a path into a list based on the system's path separator. usage: | diff --git a/commands/docs/path_type.md b/commands/docs/path_type.md index 542ce5376ab..6da51f361c0 100644 --- a/commands/docs/path_type.md +++ b/commands/docs/path_type.md @@ -2,7 +2,7 @@ title: path type categories: | path -version: 0.113.0 +version: 0.114.0 path: | Get the type of the object a path refers to (e.g., file, dir, symlink). usage: | diff --git a/commands/docs/peek.md b/commands/docs/peek.md index 6b02c156d36..427b9b41beb 100644 --- a/commands/docs/peek.md +++ b/commands/docs/peek.md @@ -2,7 +2,7 @@ title: peek categories: | default -version: 0.113.0 +version: 0.114.0 default: | Peek the first elements of a stream and store them in the metadata. usage: | @@ -62,10 +62,10 @@ Lists can also be peeked. Peeking non-list values won't return any values. ```nu > 'hello' | peek 1 | metadata | $in.peek -╭────────┬───────╮ -│ type │ value │ -│ stream │ false │ -╰────────┴───────╯ +╭────────┬────────╮ +│ type │ string │ +│ stream │ false │ +╰────────┴────────╯ ``` Peeking non-list streams (text streams, binary streams, external byte streams) won't return any values. diff --git a/commands/docs/permutations.md b/commands/docs/permutations.md new file mode 100644 index 00000000000..799d5d64025 --- /dev/null +++ b/commands/docs/permutations.md @@ -0,0 +1,93 @@ +--- +title: permutations +categories: | + filters +version: 0.114.0 +filters: | + Generates all permutations of the input list. +usage: | + Generates all permutations of the input list. +editLink: false +contributors: false +--- + + +# `permutations` for [filters](/commands/categories/filters.md) + +
Generates all permutations of the input list.
+ +## Signature + +```> permutations {flags} ``` + + +## Input/output types: + +| input | output | +| --------- | --------------- | +| list<any> | list<list<any>> | +| table | table | +## Examples + +Generate all permutations +```nu +> [1 2 3] | permutations +╭───┬───────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 2 │ │ +│ │ │ 2 │ 3 │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬───╮ │ +│ │ │ 0 │ 2 │ │ +│ │ │ 1 │ 1 │ │ +│ │ │ 2 │ 3 │ │ +│ │ ╰───┴───╯ │ +│ 2 │ ╭───┬───╮ │ +│ │ │ 0 │ 3 │ │ +│ │ │ 1 │ 1 │ │ +│ │ │ 2 │ 2 │ │ +│ │ ╰───┴───╯ │ +│ 3 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 3 │ │ +│ │ │ 2 │ 2 │ │ +│ │ ╰───┴───╯ │ +│ 4 │ ╭───┬───╮ │ +│ │ │ 0 │ 2 │ │ +│ │ │ 1 │ 3 │ │ +│ │ │ 2 │ 1 │ │ +│ │ ╰───┴───╯ │ +│ 5 │ ╭───┬───╮ │ +│ │ │ 0 │ 3 │ │ +│ │ │ 1 │ 2 │ │ +│ │ │ 2 │ 1 │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ + +``` + +Generate permutations of two elements +```nu +> [1 2] | permutations +╭───┬───────────╮ +│ 0 │ ╭───┬───╮ │ +│ │ │ 0 │ 1 │ │ +│ │ │ 1 │ 2 │ │ +│ │ ╰───┴───╯ │ +│ 1 │ ╭───┬───╮ │ +│ │ │ 0 │ 2 │ │ +│ │ │ 1 │ 1 │ │ +│ │ ╰───┴───╯ │ +╰───┴───────────╯ + +``` + +Empty list yields no permutations +```nu +> [] | permutations +╭────────────╮ +│ empty list │ +╰────────────╯ + +``` diff --git a/commands/docs/plugin.md b/commands/docs/plugin.md index 7f0eb4058a5..9a757a44ec2 100644 --- a/commands/docs/plugin.md +++ b/commands/docs/plugin.md @@ -2,7 +2,7 @@ title: plugin categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | Commands for managing plugins. usage: | diff --git a/commands/docs/plugin_add.md b/commands/docs/plugin_add.md index 4e7b4bf4f61..a54dba977b9 100644 --- a/commands/docs/plugin_add.md +++ b/commands/docs/plugin_add.md @@ -2,7 +2,7 @@ title: plugin add categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | Add a plugin to the plugin registry file. usage: | diff --git a/commands/docs/plugin_list.md b/commands/docs/plugin_list.md index 1658dd449c0..3239e5ec5c9 100644 --- a/commands/docs/plugin_list.md +++ b/commands/docs/plugin_list.md @@ -2,7 +2,7 @@ title: plugin list categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | List loaded and installed plugins. usage: | @@ -29,21 +29,56 @@ contributors: false ## Input/output types: -| input | output | -| ------- | ----------------------------------------------------------------------------------------------------------------------- | -| nothing | table<name: string, version: string, status: string, pid: int, filename: string, shell: string, commands: list<string>> | +| input | output | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nothing | table<name: string, version: string, status: string, pid: int, filename: string, shell: string, commands: list<record<name: string, description: string>>> | ## Examples List installed plugins. ```nu > plugin list -╭────┬───────┬─────────────────────┬──────────┬────────┬───────────────────────────────┬───────┬─────────────╮ -│ # │ name │ version │ status │ pid │ filename │ shell │ commands │ -├────┼───────┼─────────────────────┼──────────┼────────┼───────────────────────────────┼───────┼─────────────┤ -│ 0 │ inc │ 0.113.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ -│ │ │ │ │ │ │ │ │ 0 │ inc │ │ -│ │ │ │ │ │ │ │ ╰───┴─────╯ │ -╰────┴───────┴─────────────────────┴──────────┴────────┴───────────────────────────────┴───────┴─────────────╯ +╭───┬──────┬────────────────────┬─────────┬────────┬───────────────────────────────┬───────┬─────────────────╮ +│ # │ name │ version │ status │ pid │ filename │ shell │ commands │ +├───┼──────┼────────────────────┼─────────┼────────┼───────────────────────────────┼───────┼─────────────────┤ +│ 0 │ inc │ 0.114.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────┬───╮ │ +│ │ │ │ │ │ │ │ │ # │ nam │ d │ │ +│ │ │ │ │ │ │ │ │ │ e │ e │ │ +│ │ │ │ │ │ │ │ │ │ │ s │ │ +│ │ │ │ │ │ │ │ │ │ │ c │ │ +│ │ │ │ │ │ │ │ │ │ │ r │ │ +│ │ │ │ │ │ │ │ │ │ │ i │ │ +│ │ │ │ │ │ │ │ │ │ │ p │ │ +│ │ │ │ │ │ │ │ │ │ │ t │ │ +│ │ │ │ │ │ │ │ │ │ │ i │ │ +│ │ │ │ │ │ │ │ │ │ │ o │ │ +│ │ │ │ │ │ │ │ │ │ │ n │ │ +│ │ │ │ │ │ │ │ ├───┼─────┼───┤ │ +│ │ │ │ │ │ │ │ │ 0 │ inc │ I │ │ +│ │ │ │ │ │ │ │ │ │ │ n │ │ +│ │ │ │ │ │ │ │ │ │ │ c │ │ +│ │ │ │ │ │ │ │ │ │ │ r │ │ +│ │ │ │ │ │ │ │ │ │ │ e │ │ +│ │ │ │ │ │ │ │ │ │ │ m │ │ +│ │ │ │ │ │ │ │ │ │ │ e │ │ +│ │ │ │ │ │ │ │ │ │ │ n │ │ +│ │ │ │ │ │ │ │ │ │ │ t │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ │ a │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ │ n │ │ +│ │ │ │ │ │ │ │ │ │ │ u │ │ +│ │ │ │ │ │ │ │ │ │ │ m │ │ +│ │ │ │ │ │ │ │ │ │ │ b │ │ +│ │ │ │ │ │ │ │ │ │ │ e │ │ +│ │ │ │ │ │ │ │ │ │ │ r │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ │ b │ │ +│ │ │ │ │ │ │ │ │ │ │ y │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ │ 1 │ │ +│ │ │ │ │ │ │ │ │ │ │ . │ │ +│ │ │ │ │ │ │ │ ╰───┴─────┴───╯ │ +╰───┴──────┴────────────────────┴─────────┴────────┴───────────────────────────────┴───────┴─────────────────╯ ``` diff --git a/commands/docs/plugin_rm.md b/commands/docs/plugin_rm.md index 273434fb34e..35edcad01c7 100644 --- a/commands/docs/plugin_rm.md +++ b/commands/docs/plugin_rm.md @@ -2,7 +2,7 @@ title: plugin rm categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | Remove a plugin from the plugin registry file. usage: | diff --git a/commands/docs/plugin_stop.md b/commands/docs/plugin_stop.md index c8d6cfb9807..53a428c6a2e 100644 --- a/commands/docs/plugin_stop.md +++ b/commands/docs/plugin_stop.md @@ -2,7 +2,7 @@ title: plugin stop categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | Stop an installed plugin if it was running. usage: | diff --git a/commands/docs/plugin_use.md b/commands/docs/plugin_use.md index 7b410913002..74520b82e08 100644 --- a/commands/docs/plugin_use.md +++ b/commands/docs/plugin_use.md @@ -2,7 +2,7 @@ title: plugin use categories: | plugin -version: 0.113.0 +version: 0.114.0 plugin: | Load a plugin from the plugin registry file into scope. usage: | diff --git a/commands/docs/polars.md b/commands/docs/polars.md index 0c19236ce57..20c6dcf5b3e 100644 --- a/commands/docs/polars.md +++ b/commands/docs/polars.md @@ -2,7 +2,7 @@ title: polars categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Operate with data in a dataframe format. usage: | @@ -45,172 +45,191 @@ to the `polars agg` command with some column expressions for aggregation which t ## Subcommands: -| name | description | type | -| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -| [`polars agg`](/commands/docs/polars_agg.md) | Performs a series of aggregations from a group-by. | plugin | -| [`polars agg-groups`](/commands/docs/polars_agg-groups.md) | Creates an agg_groups expression. | plugin | -| [`polars all-false`](/commands/docs/polars_all-false.md) | Returns true if all values are false. | plugin | -| [`polars all-true`](/commands/docs/polars_all-true.md) | Returns true if all values are true. | plugin | -| [`polars append`](/commands/docs/polars_append.md) | Appends a new dataframe. | plugin | -| [`polars arg-max`](/commands/docs/polars_arg-max.md) | Return index for max value in series. | plugin | -| [`polars arg-min`](/commands/docs/polars_arg-min.md) | Return index for min value in series. | plugin | -| [`polars arg-sort`](/commands/docs/polars_arg-sort.md) | Returns indexes for a sorted series. | plugin | -| [`polars arg-true`](/commands/docs/polars_arg-true.md) | Returns indexes where values are true. | plugin | -| [`polars arg-unique`](/commands/docs/polars_arg-unique.md) | Returns indexes for unique values. | plugin | -| [`polars arg-where`](/commands/docs/polars_arg-where.md) | Creates an expression that returns the arguments where expression is true. | plugin | -| [`polars as`](/commands/docs/polars_as.md) | Creates an alias expression. | plugin | -| [`polars as-date`](/commands/docs/polars_as-date.md) | Converts string to date. | plugin | -| [`polars as-datetime`](/commands/docs/polars_as-datetime.md) | Converts string to datetime. | plugin | -| [`polars cache`](/commands/docs/polars_cache.md) | Caches operations in a new LazyFrame. | plugin | -| [`polars cast`](/commands/docs/polars_cast.md) | Cast a column to a different dtype. | plugin | -| [`polars col`](/commands/docs/polars_col.md) | Creates a named column expression. | plugin | -| [`polars collect`](/commands/docs/polars_collect.md) | Collect lazy dataframe into eager dataframe. | plugin | -| [`polars columns`](/commands/docs/polars_columns.md) | Show dataframe columns. | plugin | -| [`polars concat`](/commands/docs/polars_concat.md) | Concatenate two or more dataframes. | plugin | -| [`polars concat-str`](/commands/docs/polars_concat-str.md) | Creates a concat string expression. | plugin | -| [`polars contains`](/commands/docs/polars_contains.md) | Checks if a pattern is contained in a string. | plugin | -| [`polars convert-time-zone`](/commands/docs/polars_convert-time-zone.md) | Convert datetime to target timezone. | plugin | -| [`polars count`](/commands/docs/polars_count.md) | Returns the number of non-null values in the column. | plugin | -| [`polars count-null`](/commands/docs/polars_count-null.md) | Counts null values. | plugin | -| [`polars cumulative`](/commands/docs/polars_cumulative.md) | Cumulative calculation for a column or series. | plugin | -| [`polars cut`](/commands/docs/polars_cut.md) | Bin continuous values into discrete categories for a series. | plugin | -| [`polars datepart`](/commands/docs/polars_datepart.md) | Creates an expression for capturing the specified datepart in a column. | plugin | -| [`polars decimal`](/commands/docs/polars_decimal.md) | Converts a string column into a decimal column | plugin | -| [`polars drop`](/commands/docs/polars_drop.md) | Creates a new dataframe by dropping the selected columns. | plugin | -| [`polars drop-duplicates`](/commands/docs/polars_drop-duplicates.md) | Drops duplicate values in dataframe. | plugin | -| [`polars drop-nulls`](/commands/docs/polars_drop-nulls.md) | Drops null values in dataframe. | plugin | -| [`polars dummies`](/commands/docs/polars_dummies.md) | Creates a new dataframe with dummy variables. | plugin | -| [`polars entropy`](/commands/docs/polars_entropy.md) | Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. | plugin | -| [`polars explode`](/commands/docs/polars_explode.md) | Explodes a dataframe or creates a explode expression. | plugin | -| [`polars expr-not`](/commands/docs/polars_expr-not.md) | Creates a not expression. | plugin | -| [`polars fill-nan`](/commands/docs/polars_fill-nan.md) | Replaces NaN values with the given expression. | plugin | -| [`polars fill-null`](/commands/docs/polars_fill-null.md) | Replaces NULL values with the given expression. | plugin | -| [`polars filter`](/commands/docs/polars_filter.md) | Filter dataframe based in expression. | plugin | -| [`polars filter-with`](/commands/docs/polars_filter-with.md) | Filters dataframe using a mask or expression as reference. | plugin | -| [`polars first`](/commands/docs/polars_first.md) | Show only the first number of rows or create a first expression | plugin | -| [`polars flatten`](/commands/docs/polars_flatten.md) | An alias for polars explode. | plugin | -| [`polars get`](/commands/docs/polars_get.md) | Creates dataframe with the selected columns. | plugin | -| [`polars get-day`](/commands/docs/polars_get-day.md) | Gets day from date. | plugin | -| [`polars get-hour`](/commands/docs/polars_get-hour.md) | Gets hour from datetime. | plugin | -| [`polars get-minute`](/commands/docs/polars_get-minute.md) | Gets minute from date. | plugin | -| [`polars get-month`](/commands/docs/polars_get-month.md) | Gets month from date. | plugin | -| [`polars get-nanosecond`](/commands/docs/polars_get-nanosecond.md) | Gets nanosecond from date. | plugin | -| [`polars get-ordinal`](/commands/docs/polars_get-ordinal.md) | Gets ordinal from date. | plugin | -| [`polars get-second`](/commands/docs/polars_get-second.md) | Gets second from date. | plugin | -| [`polars get-week`](/commands/docs/polars_get-week.md) | Gets week from date. | plugin | -| [`polars get-weekday`](/commands/docs/polars_get-weekday.md) | Gets weekday from date. | plugin | -| [`polars get-year`](/commands/docs/polars_get-year.md) | Gets year from date. | plugin | -| [`polars group-by`](/commands/docs/polars_group-by.md) | Creates a group-by object that can be used for other aggregations. | plugin | -| [`polars horizontal`](/commands/docs/polars_horizontal.md) | Horizontal calculation across multiple columns. | plugin | -| [`polars implode`](/commands/docs/polars_implode.md) | Aggregates values into a list. | plugin | -| [`polars integer`](/commands/docs/polars_integer.md) | Converts a string column into a integer column | plugin | -| [`polars into-df`](/commands/docs/polars_into-df.md) | Converts a list, table or record into a dataframe. | plugin | -| [`polars into-dtype`](/commands/docs/polars_into-dtype.md) | Convert a string to a specific datatype. | plugin | -| [`polars into-lazy`](/commands/docs/polars_into-lazy.md) | Converts a dataframe into a lazy dataframe. | plugin | -| [`polars into-nu`](/commands/docs/polars_into-nu.md) | Converts a dataframe or an expression into nushell value for access and exploration. | plugin | -| [`polars into-repr`](/commands/docs/polars_into-repr.md) | Display a dataframe in its repr format. | plugin | -| [`polars into-schema`](/commands/docs/polars_into-schema.md) | Convert a value to a polars schema object | plugin | -| [`polars is-duplicated`](/commands/docs/polars_is-duplicated.md) | Creates mask indicating duplicated values. | plugin | -| [`polars is-in`](/commands/docs/polars_is-in.md) | Creates an is-in expression or checks to see if the elements are contained in the right series | plugin | -| [`polars is-not-null`](/commands/docs/polars_is-not-null.md) | Creates mask where value is not null. | plugin | -| [`polars is-null`](/commands/docs/polars_is-null.md) | Creates mask where value is null. | plugin | -| [`polars is-unique`](/commands/docs/polars_is-unique.md) | Creates mask indicating unique values. | plugin | -| [`polars join`](/commands/docs/polars_join.md) | Joins a lazy frame with other lazy frame. | plugin | -| [`polars join-where`](/commands/docs/polars_join-where.md) | Joins a lazy frame with other lazy frame based on conditions. | plugin | -| [`polars last`](/commands/docs/polars_last.md) | Creates new dataframe with tail rows or creates a last expression. | plugin | -| [`polars len`](/commands/docs/polars_len.md) | Return the number of rows in the context. This is similar to COUNT(*) in SQL. | plugin | -| [`polars list-contains`](/commands/docs/polars_list-contains.md) | Checks if an element is contained in a list. | plugin | -| [`polars lit`](/commands/docs/polars_lit.md) | Creates a literal expression. | plugin | -| [`polars lowercase`](/commands/docs/polars_lowercase.md) | Lowercase the strings in the column. | plugin | -| [`polars math`](/commands/docs/polars_math.md) | Collection of math functions to be applied on one or more column expressions | plugin | -| [`polars max`](/commands/docs/polars_max.md) | Creates a max expression or aggregates columns to their max value. | plugin | -| [`polars mean`](/commands/docs/polars_mean.md) | Creates a mean expression for an aggregation or aggregates columns to their mean value. | plugin | -| [`polars median`](/commands/docs/polars_median.md) | Median value from columns in a dataframe or creates expression for an aggregation | plugin | -| [`polars min`](/commands/docs/polars_min.md) | Creates a min expression or aggregates columns to their min value. | plugin | -| [`polars n-unique`](/commands/docs/polars_n-unique.md) | Counts unique values. | plugin | -| [`polars not`](/commands/docs/polars_not.md) | Inverts boolean mask. | plugin | -| [`polars open`](/commands/docs/polars_open.md) | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. | plugin | -| [`polars otherwise`](/commands/docs/polars_otherwise.md) | Completes a when expression. | plugin | -| [`polars over`](/commands/docs/polars_over.md) | Compute expressions over a window group defined by partition expressions. | plugin | -| [`polars pivot`](/commands/docs/polars_pivot.md) | Pivot a DataFrame from long to wide format. | plugin | -| [`polars profile`](/commands/docs/polars_profile.md) | Profile a lazy dataframe. | plugin | -| [`polars qcut`](/commands/docs/polars_qcut.md) | Bin continuous values into discrete categories based on their quantiles for a series. | plugin | -| [`polars quantile`](/commands/docs/polars_quantile.md) | Aggregates the columns to the selected quantile. | plugin | -| [`polars query`](/commands/docs/polars_query.md) | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | plugin | -| [`polars rename`](/commands/docs/polars_rename.md) | Rename a dataframe column. | plugin | -| [`polars replace`](/commands/docs/polars_replace.md) | Create an expression that replaces old values with new values | plugin | -| [`polars replace-time-zone`](/commands/docs/polars_replace-time-zone.md) | Replace the timezone information in a datetime column. | plugin | -| [`polars reverse`](/commands/docs/polars_reverse.md) | Reverses the LazyFrame | plugin | -| [`polars rolling`](/commands/docs/polars_rolling.md) | Rolling calculation for a series. | plugin | -| [`polars sample`](/commands/docs/polars_sample.md) | Create sample dataframe. | plugin | -| [`polars save`](/commands/docs/polars_save.md) | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). | plugin | -| [`polars schema`](/commands/docs/polars_schema.md) | Show schema for a dataframe. | plugin | -| [`polars select`](/commands/docs/polars_select.md) | Selects columns from lazyframe. | plugin | -| [`polars selector`](/commands/docs/polars_selector.md) | Create column selectors for use in polars commands. | plugin | -| [`polars selector all`](/commands/docs/polars_selector_all.md) | Creates a selector that selects all columns. | plugin | -| [`polars selector alpha`](/commands/docs/polars_selector_alpha.md) | Select all columns with alphabetic names (eg: only letters). Matching column names cannot contain *any* non-alphabetic characters. Note that the definition of "alphabetic" consists of all valid Unicode alphabetic characters by default; this can be changed by setting `--ascii-only`. | plugin | -| [`polars selector alphanumeric`](/commands/docs/polars_selector_alphanumeric.md) | Select all columns with alphanumeric names (eg: only letters). Matching column names cannot contain *any* non-alphanumeric characters. Note that the definition of "alphanumeric" consists of all valid Unicode alphanumeric characters by default; this can be changed by setting `ascii_only=true`. | plugin | -| [`polars selector array`](/commands/docs/polars_selector_array.md) | Select all array columns. Optionally filter by fixed width. | plugin | -| [`polars selector binary`](/commands/docs/polars_selector_binary.md) | Select all binary columns. | plugin | -| [`polars selector boolean`](/commands/docs/polars_selector_boolean.md) | Select all boolean columns. | plugin | -| [`polars selector by-dtype`](/commands/docs/polars_selector_by-dtype.md) | Creates a selector that selects columns by data type. | plugin | -| [`polars selector by-index`](/commands/docs/polars_selector_by-index.md) | Select columns by their index position. Supports negative indices (e.g., -1 for the last column). | plugin | -| [`polars selector by-name`](/commands/docs/polars_selector_by-name.md) | Creates a selector that selects columns by name. | plugin | -| [`polars selector categorical`](/commands/docs/polars_selector_categorical.md) | Select all categorical columns. | plugin | -| [`polars selector contains`](/commands/docs/polars_selector_contains.md) | Select columns whose names contain the given literal substring(s). | plugin | -| [`polars selector date`](/commands/docs/polars_selector_date.md) | Select all date columns. | plugin | -| [`polars selector datetime`](/commands/docs/polars_selector_datetime.md) | Select all datetime columns. Optionally filter by time unit (ns, us, ms) and/or timezone. | plugin | -| [`polars selector decimal`](/commands/docs/polars_selector_decimal.md) | Select all decimal columns. | plugin | -| [`polars selector digit`](/commands/docs/polars_selector_digit.md) | Select columns whose names consist entirely of digit characters. By default uses Unicode decimal digits; use `--ascii-only` to restrict to ASCII 0-9. | plugin | -| [`polars selector duration`](/commands/docs/polars_selector_duration.md) | Select all duration columns. Optionally filter by time unit (ns, us, ms). | plugin | -| [`polars selector empty`](/commands/docs/polars_selector_empty.md) | Create an empty selector that matches no columns. Useful as a base for selector composition. | plugin | -| [`polars selector ends-with`](/commands/docs/polars_selector_ends-with.md) | Select columns that end with the given substring(s). | plugin | -| [`polars selector enum`](/commands/docs/polars_selector_enum.md) | Select all enum columns. | plugin | -| [`polars selector exclude`](/commands/docs/polars_selector_exclude.md) | Select all columns except those with the given name(s). This is the inverse of `polars selector by-name`. | plugin | -| [`polars selector first`](/commands/docs/polars_selector_first.md) | Creates a selector that selects the first column(s) by index. | plugin | -| [`polars selector float`](/commands/docs/polars_selector_float.md) | Select all float columns. | plugin | -| [`polars selector integer`](/commands/docs/polars_selector_integer.md) | Select all integer columns. | plugin | -| [`polars selector last`](/commands/docs/polars_selector_last.md) | Creates a selector that selects the last column(s) by index. | plugin | -| [`polars selector list`](/commands/docs/polars_selector_list.md) | Select all list columns. | plugin | -| [`polars selector matches`](/commands/docs/polars_selector_matches.md) | Select all columns that match the given regex pattern. | plugin | -| [`polars selector nested`](/commands/docs/polars_selector_nested.md) | Select all nested columns (list, array, or struct). | plugin | -| [`polars selector not`](/commands/docs/polars_selector_not.md) | Inverts selector. | plugin | -| [`polars selector numeric`](/commands/docs/polars_selector_numeric.md) | Select all numeric columns. | plugin | -| [`polars selector object`](/commands/docs/polars_selector_object.md) | Select all object columns. | plugin | -| [`polars selector signed-integer`](/commands/docs/polars_selector_signed-integer.md) | Select all signed integer columns. | plugin | -| [`polars selector starts-with`](/commands/docs/polars_selector_starts-with.md) | Select columns that start with the given substring(s). | plugin | -| [`polars selector string`](/commands/docs/polars_selector_string.md) | Select all string columns. Use `--include-categorical` to also select categorical columns. | plugin | -| [`polars selector struct`](/commands/docs/polars_selector_struct.md) | Select all struct columns. | plugin | -| [`polars selector temporal`](/commands/docs/polars_selector_temporal.md) | Select all temporal columns (date, datetime, duration, and time). | plugin | -| [`polars selector unsigned-integer`](/commands/docs/polars_selector_unsigned-integer.md) | Select all unsigned integer columns. | plugin | -| [`polars set`](/commands/docs/polars_set.md) | Sets value where given mask is true. | plugin | -| [`polars set-with-idx`](/commands/docs/polars_set-with-idx.md) | Sets value in the given index. | plugin | -| [`polars shape`](/commands/docs/polars_shape.md) | Shows column and row size for a dataframe. | plugin | -| [`polars shift`](/commands/docs/polars_shift.md) | Shifts the values by a given period. | plugin | -| [`polars slice`](/commands/docs/polars_slice.md) | Creates new dataframe from a slice of rows. | plugin | -| [`polars sort-by`](/commands/docs/polars_sort-by.md) | Sorts a lazy dataframe based on expression(s). | plugin | -| [`polars std`](/commands/docs/polars_std.md) | Creates a std expression for an aggregation of std value from columns in a dataframe. | plugin | -| [`polars store-get`](/commands/docs/polars_store-get.md) | Gets a Dataframe or other object from the plugin cache. | plugin | -| [`polars store-ls`](/commands/docs/polars_store-ls.md) | Lists stored polars objects. | plugin | -| [`polars store-rm`](/commands/docs/polars_store-rm.md) | Removes a stored Dataframe or other object from the plugin cache. | plugin | -| [`polars str-join`](/commands/docs/polars_str-join.md) | Concatenates strings within a column or dataframes | plugin | -| [`polars str-lengths`](/commands/docs/polars_str-lengths.md) | Get lengths of all strings. | plugin | -| [`polars str-replace`](/commands/docs/polars_str-replace.md) | Replace the leftmost (sub)string by a regex pattern. | plugin | -| [`polars str-replace-all`](/commands/docs/polars_str-replace-all.md) | Replace all (sub)strings by a regex pattern. | plugin | -| [`polars str-slice`](/commands/docs/polars_str-slice.md) | Slices the string from the start position until the selected length. | plugin | -| [`polars str-split`](/commands/docs/polars_str-split.md) | Split the string by a substring. The resulting dtype is list\\. | plugin | -| [`polars str-strip-chars`](/commands/docs/polars_str-strip-chars.md) | Strips specified characters from strings in a column | plugin | -| [`polars strftime`](/commands/docs/polars_strftime.md) | Formats date based on string rule. | plugin | -| [`polars struct-json-encode`](/commands/docs/polars_struct-json-encode.md) | Convert this struct to a string column with json values. | plugin | -| [`polars sum`](/commands/docs/polars_sum.md) | Creates a sum expression for an aggregation or aggregates columns to their sum value. | plugin | -| [`polars summary`](/commands/docs/polars_summary.md) | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | plugin | -| [`polars take`](/commands/docs/polars_take.md) | Creates new dataframe using the given indices. | plugin | -| [`polars truncate`](/commands/docs/polars_truncate.md) | Divide the date/datetime range into buckets. | plugin | -| [`polars unique`](/commands/docs/polars_unique.md) | Returns unique values from a dataframe. | plugin | -| [`polars unnest`](/commands/docs/polars_unnest.md) | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. | plugin | -| [`polars unpivot`](/commands/docs/polars_unpivot.md) | Unpivot a DataFrame from wide to long format. | plugin | -| [`polars uppercase`](/commands/docs/polars_uppercase.md) | Uppercase the strings in the column. | plugin | -| [`polars value-counts`](/commands/docs/polars_value-counts.md) | Returns a dataframe with the counts for unique values in series. | plugin | -| [`polars var`](/commands/docs/polars_var.md) | Create a var expression for an aggregation. | plugin | -| [`polars when`](/commands/docs/polars_when.md) | Creates and modifies a when expression. | plugin | -| [`polars with-column`](/commands/docs/polars_with-column.md) | Adds a series to the dataframe. | plugin | \ No newline at end of file +| name | description | type | +| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| [`polars agg`](/commands/docs/polars_agg.md) | Performs a series of aggregations from a group-by. | plugin | +| [`polars agg-groups`](/commands/docs/polars_agg-groups.md) | Creates an agg_groups expression. | plugin | +| [`polars all-false`](/commands/docs/polars_all-false.md) | Returns true if all values are false. | plugin | +| [`polars all-true`](/commands/docs/polars_all-true.md) | Returns true if all values are true. | plugin | +| [`polars append`](/commands/docs/polars_append.md) | Appends a new dataframe. | plugin | +| [`polars arg-max`](/commands/docs/polars_arg-max.md) | Return index for max value in series. | plugin | +| [`polars arg-min`](/commands/docs/polars_arg-min.md) | Return index for min value in series. | plugin | +| [`polars arg-sort`](/commands/docs/polars_arg-sort.md) | Returns indexes for a sorted series. | plugin | +| [`polars arg-true`](/commands/docs/polars_arg-true.md) | Returns indexes where values are true. | plugin | +| [`polars arg-unique`](/commands/docs/polars_arg-unique.md) | Returns indexes for unique values. | plugin | +| [`polars arg-where`](/commands/docs/polars_arg-where.md) | Creates an expression that returns the arguments where expression is true. | plugin | +| [`polars as`](/commands/docs/polars_as.md) | Creates an alias expression. | plugin | +| [`polars as-date`](/commands/docs/polars_as-date.md) | Converts string to date. | plugin | +| [`polars as-datetime`](/commands/docs/polars_as-datetime.md) | Converts string to datetime. | plugin | +| [`polars cache`](/commands/docs/polars_cache.md) | Caches operations in a new LazyFrame. | plugin | +| [`polars cast`](/commands/docs/polars_cast.md) | Cast a column to a different dtype. | plugin | +| [`polars col`](/commands/docs/polars_col.md) | Creates a named column expression. | plugin | +| [`polars collect`](/commands/docs/polars_collect.md) | Collect lazy dataframe into eager dataframe. | plugin | +| [`polars columns`](/commands/docs/polars_columns.md) | Show dataframe columns. | plugin | +| [`polars concat`](/commands/docs/polars_concat.md) | Concatenate two or more dataframes. | plugin | +| [`polars concat-str`](/commands/docs/polars_concat-str.md) | Creates a concat string expression. | plugin | +| [`polars contains`](/commands/docs/polars_contains.md) | Checks if a pattern is contained in a string. | plugin | +| [`polars convert-time-zone`](/commands/docs/polars_convert-time-zone.md) | Convert datetime to target timezone. | plugin | +| [`polars count`](/commands/docs/polars_count.md) | Returns the number of non-null values in the column. | plugin | +| [`polars count-null`](/commands/docs/polars_count-null.md) | Counts null values. | plugin | +| [`polars cumulative`](/commands/docs/polars_cumulative.md) | Cumulative calculation for a column or series. | plugin | +| [`polars cut`](/commands/docs/polars_cut.md) | Bin continuous values into discrete categories for a series. | plugin | +| [`polars datepart`](/commands/docs/polars_datepart.md) | Creates an expression for capturing the specified datepart in a column. | plugin | +| [`polars decimal`](/commands/docs/polars_decimal.md) | Converts a string column into a decimal column | plugin | +| [`polars drop`](/commands/docs/polars_drop.md) | Creates a new dataframe by dropping the selected columns. | plugin | +| [`polars drop-duplicates`](/commands/docs/polars_drop-duplicates.md) | Drops duplicate values in dataframe. | plugin | +| [`polars drop-nulls`](/commands/docs/polars_drop-nulls.md) | Drops null values in dataframe. | plugin | +| [`polars dummies`](/commands/docs/polars_dummies.md) | Creates a new dataframe with dummy variables. | plugin | +| [`polars entropy`](/commands/docs/polars_entropy.md) | Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. | plugin | +| [`polars explode`](/commands/docs/polars_explode.md) | Explodes a dataframe or creates a explode expression. | plugin | +| [`polars expr-not`](/commands/docs/polars_expr-not.md) | Creates a not expression. | plugin | +| [`polars fill-nan`](/commands/docs/polars_fill-nan.md) | Replaces NaN values with the given expression. | plugin | +| [`polars fill-null`](/commands/docs/polars_fill-null.md) | Replaces NULL values with the given expression. | plugin | +| [`polars filter`](/commands/docs/polars_filter.md) | Filter dataframe based in expression. | plugin | +| [`polars filter-with`](/commands/docs/polars_filter-with.md) | Filters dataframe using a mask or expression as reference. | plugin | +| [`polars first`](/commands/docs/polars_first.md) | Show only the first number of rows or create a first expression | plugin | +| [`polars flatten`](/commands/docs/polars_flatten.md) | An alias for polars explode. | plugin | +| [`polars get`](/commands/docs/polars_get.md) | Creates dataframe with the selected columns. | plugin | +| [`polars get-day`](/commands/docs/polars_get-day.md) | Gets day from date. | plugin | +| [`polars get-hour`](/commands/docs/polars_get-hour.md) | Gets hour from datetime. | plugin | +| [`polars get-minute`](/commands/docs/polars_get-minute.md) | Gets minute from date. | plugin | +| [`polars get-month`](/commands/docs/polars_get-month.md) | Gets month from date. | plugin | +| [`polars get-nanosecond`](/commands/docs/polars_get-nanosecond.md) | Gets nanosecond from date. | plugin | +| [`polars get-ordinal`](/commands/docs/polars_get-ordinal.md) | Gets ordinal from date. | plugin | +| [`polars get-second`](/commands/docs/polars_get-second.md) | Gets second from date. | plugin | +| [`polars get-week`](/commands/docs/polars_get-week.md) | Gets week from date. | plugin | +| [`polars get-weekday`](/commands/docs/polars_get-weekday.md) | Gets weekday from date. | plugin | +| [`polars get-year`](/commands/docs/polars_get-year.md) | Gets year from date. | plugin | +| [`polars group-by`](/commands/docs/polars_group-by.md) | Creates a group-by object that can be used for other aggregations. | plugin | +| [`polars horizontal`](/commands/docs/polars_horizontal.md) | Horizontal calculation across multiple columns. | plugin | +| [`polars implode`](/commands/docs/polars_implode.md) | Aggregates values into a list. | plugin | +| [`polars integer`](/commands/docs/polars_integer.md) | Converts a string column into a integer column | plugin | +| [`polars into-df`](/commands/docs/polars_into-df.md) | Converts a list, table or record into a dataframe. | plugin | +| [`polars into-dtype`](/commands/docs/polars_into-dtype.md) | Convert a string to a specific datatype. | plugin | +| [`polars into-lazy`](/commands/docs/polars_into-lazy.md) | Converts a dataframe into a lazy dataframe. | plugin | +| [`polars into-nu`](/commands/docs/polars_into-nu.md) | Converts a dataframe or an expression into nushell value for access and exploration. | plugin | +| [`polars into-repr`](/commands/docs/polars_into-repr.md) | Display a dataframe in its repr format. | plugin | +| [`polars into-schema`](/commands/docs/polars_into-schema.md) | Convert a value to a polars schema object | plugin | +| [`polars is-duplicated`](/commands/docs/polars_is-duplicated.md) | Creates mask indicating duplicated values. | plugin | +| [`polars is-in`](/commands/docs/polars_is-in.md) | Creates an is-in expression or checks to see if the elements are contained in the right series | plugin | +| [`polars is-not-null`](/commands/docs/polars_is-not-null.md) | Creates mask where value is not null. | plugin | +| [`polars is-null`](/commands/docs/polars_is-null.md) | Creates mask where value is null. | plugin | +| [`polars is-unique`](/commands/docs/polars_is-unique.md) | Creates mask indicating unique values. | plugin | +| [`polars join`](/commands/docs/polars_join.md) | Joins a lazy frame with other lazy frame. | plugin | +| [`polars join-where`](/commands/docs/polars_join-where.md) | Joins a lazy frame with other lazy frame based on conditions. | plugin | +| [`polars last`](/commands/docs/polars_last.md) | Creates new dataframe with tail rows or creates a last expression. | plugin | +| [`polars len`](/commands/docs/polars_len.md) | Return the number of rows in the context. This is similar to COUNT(*) in SQL. | plugin | +| [`polars list-contains`](/commands/docs/polars_list-contains.md) | Checks if an element is contained in a list. | plugin | +| [`polars lit`](/commands/docs/polars_lit.md) | Creates a literal expression. | plugin | +| [`polars lowercase`](/commands/docs/polars_lowercase.md) | Lowercase the strings in the column. | plugin | +| [`polars map-batches`](/commands/docs/polars_map-batches.md) | Map a custom Nushell closure over one or more dataframe columns. | plugin | +| [`polars math`](/commands/docs/polars_math.md) | Collection of math functions to be applied on column expressions. | plugin | +| [`polars math abs`](/commands/docs/polars_math_abs.md) | Compute the absolute values of a column expression. | plugin | +| [`polars math bitwise-and`](/commands/docs/polars_math_bitwise-and.md) | Perform an aggregation of bitwise ANDs over a column expression. | plugin | +| [`polars math bitwise-count-ones`](/commands/docs/polars_math_bitwise-count-ones.md) | Compute the number of set bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-count-zeros`](/commands/docs/polars_math_bitwise-count-zeros.md) | Compute the number of unset bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-leading-ones`](/commands/docs/polars_math_bitwise-leading-ones.md) | Compute the number of leading set bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-leading-zeros`](/commands/docs/polars_math_bitwise-leading-zeros.md) | Compute the number of leading unset bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-or`](/commands/docs/polars_math_bitwise-or.md) | Perform an aggregation of bitwise ORs over a column expression. | plugin | +| [`polars math bitwise-trailing-ones`](/commands/docs/polars_math_bitwise-trailing-ones.md) | Compute the number of trailing set bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-trailing-zeros`](/commands/docs/polars_math_bitwise-trailing-zeros.md) | Compute the number of trailing unset bits for each element in an integer column expression. | plugin | +| [`polars math bitwise-xor`](/commands/docs/polars_math_bitwise-xor.md) | Perform an aggregation of bitwise XORs over a column expression. | plugin | +| [`polars math cos`](/commands/docs/polars_math_cos.md) | Compute the element-wise cosine of a column expression. | plugin | +| [`polars math dot`](/commands/docs/polars_math_dot.md) | Compute the dot product of two column expressions. | plugin | +| [`polars math exp`](/commands/docs/polars_math_exp.md) | Compute element-wise e raised to the power of a column expression. | plugin | +| [`polars math log`](/commands/docs/polars_math_log.md) | Compute the element-wise logarithm of a column expression. | plugin | +| [`polars math log1p`](/commands/docs/polars_math_log1p.md) | Compute the element-wise natural log of 1 + x for a column expression. | plugin | +| [`polars math sign`](/commands/docs/polars_math_sign.md) | Compute the element-wise sign of a column expression, returning -1, 0, or 1. | plugin | +| [`polars math sin`](/commands/docs/polars_math_sin.md) | Compute the element-wise sine of a column expression. | plugin | +| [`polars math sqrt`](/commands/docs/polars_math_sqrt.md) | Compute the element-wise square root of a column expression. | plugin | +| [`polars max`](/commands/docs/polars_max.md) | Creates a max expression or aggregates columns to their max value. | plugin | +| [`polars mean`](/commands/docs/polars_mean.md) | Creates a mean expression for an aggregation or aggregates columns to their mean value. | plugin | +| [`polars median`](/commands/docs/polars_median.md) | Median value from columns in a dataframe or creates expression for an aggregation | plugin | +| [`polars min`](/commands/docs/polars_min.md) | Creates a min expression or aggregates columns to their min value. | plugin | +| [`polars n-unique`](/commands/docs/polars_n-unique.md) | Counts unique values. | plugin | +| [`polars not`](/commands/docs/polars_not.md) | Inverts boolean mask. | plugin | +| [`polars open`](/commands/docs/polars_open.md) | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. | plugin | +| [`polars otherwise`](/commands/docs/polars_otherwise.md) | Completes a when expression. | plugin | +| [`polars over`](/commands/docs/polars_over.md) | Compute expressions over a window group defined by partition expressions. | plugin | +| [`polars pivot`](/commands/docs/polars_pivot.md) | Pivot a DataFrame from long to wide format. | plugin | +| [`polars profile`](/commands/docs/polars_profile.md) | Profile a lazy dataframe. | plugin | +| [`polars qcut`](/commands/docs/polars_qcut.md) | Bin continuous values into discrete categories based on their quantiles for a series. | plugin | +| [`polars quantile`](/commands/docs/polars_quantile.md) | Aggregates the columns to the selected quantile. | plugin | +| [`polars query`](/commands/docs/polars_query.md) | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. | plugin | +| [`polars rename`](/commands/docs/polars_rename.md) | Rename a dataframe column. | plugin | +| [`polars replace`](/commands/docs/polars_replace.md) | Create an expression that replaces old values with new values | plugin | +| [`polars replace-time-zone`](/commands/docs/polars_replace-time-zone.md) | Replace the timezone information in a datetime column. | plugin | +| [`polars reverse`](/commands/docs/polars_reverse.md) | Reverses the LazyFrame | plugin | +| [`polars rolling`](/commands/docs/polars_rolling.md) | Rolling calculation for a series. | plugin | +| [`polars sample`](/commands/docs/polars_sample.md) | Create sample dataframe. | plugin | +| [`polars save`](/commands/docs/polars_save.md) | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). | plugin | +| [`polars schema`](/commands/docs/polars_schema.md) | Show schema for a dataframe. | plugin | +| [`polars select`](/commands/docs/polars_select.md) | Selects columns from lazyframe. | plugin | +| [`polars selector`](/commands/docs/polars_selector.md) | Create column selectors for use in polars commands. | plugin | +| [`polars selector all`](/commands/docs/polars_selector_all.md) | Creates a selector that selects all columns. | plugin | +| [`polars selector alpha`](/commands/docs/polars_selector_alpha.md) | Select all columns with alphabetic names (eg: only letters). Matching column names cannot contain *any* non-alphabetic characters. Note that the definition of "alphabetic" consists of all valid Unicode alphabetic characters by default; this can be changed by setting `--ascii-only`. | plugin | +| [`polars selector alphanumeric`](/commands/docs/polars_selector_alphanumeric.md) | Select all columns with alphanumeric names (eg: only letters). Matching column names cannot contain *any* non-alphanumeric characters. Note that the definition of "alphanumeric" consists of all valid Unicode alphanumeric characters by default; this can be changed by setting `ascii_only=true`. | plugin | +| [`polars selector array`](/commands/docs/polars_selector_array.md) | Select all array columns. Optionally filter by fixed width. | plugin | +| [`polars selector binary`](/commands/docs/polars_selector_binary.md) | Select all binary columns. | plugin | +| [`polars selector boolean`](/commands/docs/polars_selector_boolean.md) | Select all boolean columns. | plugin | +| [`polars selector by-dtype`](/commands/docs/polars_selector_by-dtype.md) | Creates a selector that selects columns by data type. | plugin | +| [`polars selector by-index`](/commands/docs/polars_selector_by-index.md) | Select columns by their index position. Supports negative indices (e.g., -1 for the last column). | plugin | +| [`polars selector by-name`](/commands/docs/polars_selector_by-name.md) | Creates a selector that selects columns by name. | plugin | +| [`polars selector categorical`](/commands/docs/polars_selector_categorical.md) | Select all categorical columns. | plugin | +| [`polars selector contains`](/commands/docs/polars_selector_contains.md) | Select columns whose names contain the given literal substring(s). | plugin | +| [`polars selector date`](/commands/docs/polars_selector_date.md) | Select all date columns. | plugin | +| [`polars selector datetime`](/commands/docs/polars_selector_datetime.md) | Select all datetime columns. Optionally filter by time unit (ns, us, ms) and/or timezone. | plugin | +| [`polars selector decimal`](/commands/docs/polars_selector_decimal.md) | Select all decimal columns. | plugin | +| [`polars selector digit`](/commands/docs/polars_selector_digit.md) | Select columns whose names consist entirely of digit characters. By default uses Unicode decimal digits; use `--ascii-only` to restrict to ASCII 0-9. | plugin | +| [`polars selector duration`](/commands/docs/polars_selector_duration.md) | Select all duration columns. Optionally filter by time unit (ns, us, ms). | plugin | +| [`polars selector empty`](/commands/docs/polars_selector_empty.md) | Create an empty selector that matches no columns. Useful as a base for selector composition. | plugin | +| [`polars selector ends-with`](/commands/docs/polars_selector_ends-with.md) | Select columns that end with the given substring(s). | plugin | +| [`polars selector enum`](/commands/docs/polars_selector_enum.md) | Select all enum columns. | plugin | +| [`polars selector exclude`](/commands/docs/polars_selector_exclude.md) | Select all columns except those with the given name(s). This is the inverse of `polars selector by-name`. | plugin | +| [`polars selector first`](/commands/docs/polars_selector_first.md) | Creates a selector that selects the first column(s) by index. | plugin | +| [`polars selector float`](/commands/docs/polars_selector_float.md) | Select all float columns. | plugin | +| [`polars selector integer`](/commands/docs/polars_selector_integer.md) | Select all integer columns. | plugin | +| [`polars selector last`](/commands/docs/polars_selector_last.md) | Creates a selector that selects the last column(s) by index. | plugin | +| [`polars selector list`](/commands/docs/polars_selector_list.md) | Select all list columns. | plugin | +| [`polars selector matches`](/commands/docs/polars_selector_matches.md) | Select all columns that match the given regex pattern. | plugin | +| [`polars selector nested`](/commands/docs/polars_selector_nested.md) | Select all nested columns (list, array, or struct). | plugin | +| [`polars selector not`](/commands/docs/polars_selector_not.md) | Inverts selector. | plugin | +| [`polars selector numeric`](/commands/docs/polars_selector_numeric.md) | Select all numeric columns. | plugin | +| [`polars selector object`](/commands/docs/polars_selector_object.md) | Select all object columns. | plugin | +| [`polars selector signed-integer`](/commands/docs/polars_selector_signed-integer.md) | Select all signed integer columns. | plugin | +| [`polars selector starts-with`](/commands/docs/polars_selector_starts-with.md) | Select columns that start with the given substring(s). | plugin | +| [`polars selector string`](/commands/docs/polars_selector_string.md) | Select all string columns. Use `--include-categorical` to also select categorical columns. | plugin | +| [`polars selector struct`](/commands/docs/polars_selector_struct.md) | Select all struct columns. | plugin | +| [`polars selector temporal`](/commands/docs/polars_selector_temporal.md) | Select all temporal columns (date, datetime, duration, and time). | plugin | +| [`polars selector unsigned-integer`](/commands/docs/polars_selector_unsigned-integer.md) | Select all unsigned integer columns. | plugin | +| [`polars set`](/commands/docs/polars_set.md) | Sets value where given mask is true. | plugin | +| [`polars set-with-idx`](/commands/docs/polars_set-with-idx.md) | Sets value in the given index. | plugin | +| [`polars shape`](/commands/docs/polars_shape.md) | Shows column and row size for a dataframe. | plugin | +| [`polars shift`](/commands/docs/polars_shift.md) | Shifts the values by a given period. | plugin | +| [`polars slice`](/commands/docs/polars_slice.md) | Creates new dataframe from a slice of rows. | plugin | +| [`polars sort-by`](/commands/docs/polars_sort-by.md) | Sorts a lazy dataframe based on expression(s). | plugin | +| [`polars std`](/commands/docs/polars_std.md) | Creates a std expression for an aggregation of std value from columns in a dataframe. | plugin | +| [`polars store-get`](/commands/docs/polars_store-get.md) | Gets a Dataframe or other object from the plugin cache. | plugin | +| [`polars store-ls`](/commands/docs/polars_store-ls.md) | Lists stored polars objects. | plugin | +| [`polars store-rm`](/commands/docs/polars_store-rm.md) | Removes a stored Dataframe or other object from the plugin cache. | plugin | +| [`polars str-join`](/commands/docs/polars_str-join.md) | Concatenates strings within a column or dataframes | plugin | +| [`polars str-lengths`](/commands/docs/polars_str-lengths.md) | Get lengths of all strings. | plugin | +| [`polars str-replace`](/commands/docs/polars_str-replace.md) | Replace the leftmost (sub)string by a regex pattern. | plugin | +| [`polars str-replace-all`](/commands/docs/polars_str-replace-all.md) | Replace all (sub)strings by a regex pattern. | plugin | +| [`polars str-slice`](/commands/docs/polars_str-slice.md) | Slices the string from the start position until the selected length. | plugin | +| [`polars str-split`](/commands/docs/polars_str-split.md) | Split the string by a substring. The resulting dtype is list\\. | plugin | +| [`polars str-strip-chars`](/commands/docs/polars_str-strip-chars.md) | Strips specified characters from strings in a column | plugin | +| [`polars strftime`](/commands/docs/polars_strftime.md) | Formats date based on string rule. | plugin | +| [`polars struct-json-encode`](/commands/docs/polars_struct-json-encode.md) | Convert this struct to a string column with json values. | plugin | +| [`polars sum`](/commands/docs/polars_sum.md) | Creates a sum expression for an aggregation or aggregates columns to their sum value. | plugin | +| [`polars summary`](/commands/docs/polars_summary.md) | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. | plugin | +| [`polars take`](/commands/docs/polars_take.md) | Creates new dataframe using the given indices. | plugin | +| [`polars truncate`](/commands/docs/polars_truncate.md) | Divide the date/datetime range into buckets. | plugin | +| [`polars unique`](/commands/docs/polars_unique.md) | Returns unique values from a dataframe. | plugin | +| [`polars unnest`](/commands/docs/polars_unnest.md) | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. | plugin | +| [`polars unpivot`](/commands/docs/polars_unpivot.md) | Unpivot a DataFrame from wide to long format. | plugin | +| [`polars uppercase`](/commands/docs/polars_uppercase.md) | Uppercase the strings in the column. | plugin | +| [`polars value-counts`](/commands/docs/polars_value-counts.md) | Returns a dataframe with the counts for unique values in series. | plugin | +| [`polars var`](/commands/docs/polars_var.md) | Create a var expression for an aggregation. | plugin | +| [`polars when`](/commands/docs/polars_when.md) | Creates and modifies a when expression. | plugin | +| [`polars with-column`](/commands/docs/polars_with-column.md) | Adds a series to the dataframe. | plugin | \ No newline at end of file diff --git a/commands/docs/polars_agg-groups.md b/commands/docs/polars_agg-groups.md index a867f144036..2f7ecb5c2ee 100644 --- a/commands/docs/polars_agg-groups.md +++ b/commands/docs/polars_agg-groups.md @@ -2,7 +2,7 @@ title: polars agg-groups categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates an agg_groups expression. usage: | diff --git a/commands/docs/polars_agg.md b/commands/docs/polars_agg.md index af2bd473c79..072c89a7438 100644 --- a/commands/docs/polars_agg.md +++ b/commands/docs/polars_agg.md @@ -2,7 +2,7 @@ title: polars agg categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Performs a series of aggregations from a group-by. usage: | diff --git a/commands/docs/polars_all-false.md b/commands/docs/polars_all-false.md index a95e2aef7d7..e8523e1b32b 100644 --- a/commands/docs/polars_all-false.md +++ b/commands/docs/polars_all-false.md @@ -2,7 +2,7 @@ title: polars all-false categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns true if all values are false. usage: | diff --git a/commands/docs/polars_all-true.md b/commands/docs/polars_all-true.md index a7533c313fc..2e24b72c765 100644 --- a/commands/docs/polars_all-true.md +++ b/commands/docs/polars_all-true.md @@ -2,7 +2,7 @@ title: polars all-true categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns true if all values are true. usage: | diff --git a/commands/docs/polars_append.md b/commands/docs/polars_append.md index 4c198150e5b..2b4958f0e70 100644 --- a/commands/docs/polars_append.md +++ b/commands/docs/polars_append.md @@ -2,7 +2,7 @@ title: polars append categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Appends a new dataframe. usage: | diff --git a/commands/docs/polars_arg-max.md b/commands/docs/polars_arg-max.md index 99030841357..8d0f2dd111f 100644 --- a/commands/docs/polars_arg-max.md +++ b/commands/docs/polars_arg-max.md @@ -2,7 +2,7 @@ title: polars arg-max categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Return index for max value in series. usage: | diff --git a/commands/docs/polars_arg-min.md b/commands/docs/polars_arg-min.md index 53e874469e7..65c92d66b32 100644 --- a/commands/docs/polars_arg-min.md +++ b/commands/docs/polars_arg-min.md @@ -2,7 +2,7 @@ title: polars arg-min categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Return index for min value in series. usage: | diff --git a/commands/docs/polars_arg-sort.md b/commands/docs/polars_arg-sort.md index 1212ed53b34..dc5139cc9b8 100644 --- a/commands/docs/polars_arg-sort.md +++ b/commands/docs/polars_arg-sort.md @@ -2,7 +2,7 @@ title: polars arg-sort categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns indexes for a sorted series. usage: | diff --git a/commands/docs/polars_arg-true.md b/commands/docs/polars_arg-true.md index d776cb74b54..75a243f12fc 100644 --- a/commands/docs/polars_arg-true.md +++ b/commands/docs/polars_arg-true.md @@ -2,7 +2,7 @@ title: polars arg-true categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns indexes where values are true. usage: | diff --git a/commands/docs/polars_arg-unique.md b/commands/docs/polars_arg-unique.md index 8eae9ca5406..cd09ed8a9b5 100644 --- a/commands/docs/polars_arg-unique.md +++ b/commands/docs/polars_arg-unique.md @@ -2,7 +2,7 @@ title: polars arg-unique categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns indexes for unique values. usage: | diff --git a/commands/docs/polars_arg-where.md b/commands/docs/polars_arg-where.md index b47d4d4604a..cdc060e0bb7 100644 --- a/commands/docs/polars_arg-where.md +++ b/commands/docs/polars_arg-where.md @@ -2,7 +2,7 @@ title: polars arg-where categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates an expression that returns the arguments where expression is true. usage: | diff --git a/commands/docs/polars_as-date.md b/commands/docs/polars_as-date.md index f07f2e48452..dfe65435b2f 100644 --- a/commands/docs/polars_as-date.md +++ b/commands/docs/polars_as-date.md @@ -2,7 +2,7 @@ title: polars as-date categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts string to date. usage: | @@ -36,6 +36,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Converts string to date diff --git a/commands/docs/polars_as-datetime.md b/commands/docs/polars_as-datetime.md index a50a165affc..f7742a708ef 100644 --- a/commands/docs/polars_as-datetime.md +++ b/commands/docs/polars_as-datetime.md @@ -2,7 +2,7 @@ title: polars as-datetime categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts string to datetime. usage: | @@ -45,6 +45,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Converts string to datetime @@ -88,10 +89,10 @@ Converts string to datetime using the `--not-exact` flag even with excessive sym ╭───┬──────────────╮ │ # │ datetime │ ├───┼──────────────┤ -│ 0 │ 6 months ago │ -│ 1 │ 6 months ago │ -│ 2 │ 6 months ago │ -│ 3 │ 6 months ago │ +│ 0 │ 8 months ago │ +│ 1 │ 8 months ago │ +│ 2 │ 8 months ago │ +│ 3 │ 8 months ago │ ╰───┴──────────────╯ ``` diff --git a/commands/docs/polars_as.md b/commands/docs/polars_as.md index 086218ee8c9..6ac232020e9 100644 --- a/commands/docs/polars_as.md +++ b/commands/docs/polars_as.md @@ -2,7 +2,7 @@ title: polars as categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates an alias expression. usage: | diff --git a/commands/docs/polars_cache.md b/commands/docs/polars_cache.md index 5227e05bc99..f11a14d65a9 100644 --- a/commands/docs/polars_cache.md +++ b/commands/docs/polars_cache.md @@ -2,7 +2,7 @@ title: polars cache categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Caches operations in a new LazyFrame. usage: | diff --git a/commands/docs/polars_cast.md b/commands/docs/polars_cast.md index 5ccd6bf8178..ae73aaea394 100644 --- a/commands/docs/polars_cast.md +++ b/commands/docs/polars_cast.md @@ -2,7 +2,7 @@ title: polars cast categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Cast a column to a different dtype. usage: | @@ -31,6 +31,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_col.md b/commands/docs/polars_col.md index e856fc4651b..f34f87bc763 100644 --- a/commands/docs/polars_col.md +++ b/commands/docs/polars_col.md @@ -2,7 +2,7 @@ title: polars col categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a named column expression. usage: | diff --git a/commands/docs/polars_collect.md b/commands/docs/polars_collect.md index 452a5c35337..ab4c86d5ca1 100644 --- a/commands/docs/polars_collect.md +++ b/commands/docs/polars_collect.md @@ -2,7 +2,7 @@ title: polars collect categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Collect lazy dataframe into eager dataframe. usage: | diff --git a/commands/docs/polars_columns.md b/commands/docs/polars_columns.md index 767ca6b51c7..62751d5740b 100644 --- a/commands/docs/polars_columns.md +++ b/commands/docs/polars_columns.md @@ -2,7 +2,7 @@ title: polars columns categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Show dataframe columns. usage: | diff --git a/commands/docs/polars_concat-str.md b/commands/docs/polars_concat-str.md index 2650eb5df71..ca52948b0f7 100644 --- a/commands/docs/polars_concat-str.md +++ b/commands/docs/polars_concat-str.md @@ -2,7 +2,7 @@ title: polars concat-str categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a concat string expression. usage: | diff --git a/commands/docs/polars_concat.md b/commands/docs/polars_concat.md index 1268bc8bb3a..e1409bf347c 100644 --- a/commands/docs/polars_concat.md +++ b/commands/docs/polars_concat.md @@ -2,7 +2,7 @@ title: polars concat categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Concatenate two or more dataframes. usage: | diff --git a/commands/docs/polars_contains.md b/commands/docs/polars_contains.md index 6a2fee108ac..976af8e3d8d 100644 --- a/commands/docs/polars_contains.md +++ b/commands/docs/polars_contains.md @@ -2,7 +2,7 @@ title: polars contains categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Checks if a pattern is contained in a string. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_convert-time-zone.md b/commands/docs/polars_convert-time-zone.md index d482958f830..c28cea689e2 100644 --- a/commands/docs/polars_convert-time-zone.md +++ b/commands/docs/polars_convert-time-zone.md @@ -2,7 +2,7 @@ title: polars convert-time-zone categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Convert datetime to target timezone. usage: | diff --git a/commands/docs/polars_count-null.md b/commands/docs/polars_count-null.md index 80e303194fc..5f8967ca02f 100644 --- a/commands/docs/polars_count-null.md +++ b/commands/docs/polars_count-null.md @@ -2,7 +2,7 @@ title: polars count-null categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Counts null values. usage: | diff --git a/commands/docs/polars_count.md b/commands/docs/polars_count.md index 56e070fe438..b97c87e22aa 100644 --- a/commands/docs/polars_count.md +++ b/commands/docs/polars_count.md @@ -2,7 +2,7 @@ title: polars count categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns the number of non-null values in the column. usage: | diff --git a/commands/docs/polars_cumulative.md b/commands/docs/polars_cumulative.md index 68e2e631379..86f2d892572 100644 --- a/commands/docs/polars_cumulative.md +++ b/commands/docs/polars_cumulative.md @@ -2,7 +2,7 @@ title: polars cumulative categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Cumulative calculation for a column or series. usage: | @@ -36,6 +36,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Cumulative sum for a column diff --git a/commands/docs/polars_cut.md b/commands/docs/polars_cut.md index 5aa587b8741..0852e6f149d 100644 --- a/commands/docs/polars_cut.md +++ b/commands/docs/polars_cut.md @@ -2,7 +2,7 @@ title: polars cut categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Bin continuous values into discrete categories for a series. usage: | diff --git a/commands/docs/polars_datepart.md b/commands/docs/polars_datepart.md index a89d11fcf7b..2cbc0eb3889 100644 --- a/commands/docs/polars_datepart.md +++ b/commands/docs/polars_datepart.md @@ -2,7 +2,7 @@ title: polars datepart categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates an expression for capturing the specified datepart in a column. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Creates an expression to capture the year date part diff --git a/commands/docs/polars_decimal.md b/commands/docs/polars_decimal.md index 7e0708f7eff..ce7f678f931 100644 --- a/commands/docs/polars_decimal.md +++ b/commands/docs/polars_decimal.md @@ -2,7 +2,7 @@ title: polars decimal categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts a string column into a decimal column usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Modifies strings to decimal diff --git a/commands/docs/polars_drop-duplicates.md b/commands/docs/polars_drop-duplicates.md index 616ddda684a..d0e60cd6c89 100644 --- a/commands/docs/polars_drop-duplicates.md +++ b/commands/docs/polars_drop-duplicates.md @@ -2,7 +2,7 @@ title: polars drop-duplicates categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Drops duplicate values in dataframe. usage: | diff --git a/commands/docs/polars_drop-nulls.md b/commands/docs/polars_drop-nulls.md index 986dd541e1e..60ee02dcf6e 100644 --- a/commands/docs/polars_drop-nulls.md +++ b/commands/docs/polars_drop-nulls.md @@ -2,7 +2,7 @@ title: polars drop-nulls categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Drops null values in dataframe. usage: | diff --git a/commands/docs/polars_drop.md b/commands/docs/polars_drop.md index fd3e23a5b89..47dea471e21 100644 --- a/commands/docs/polars_drop.md +++ b/commands/docs/polars_drop.md @@ -2,7 +2,7 @@ title: polars drop categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a new dataframe by dropping the selected columns. usage: | diff --git a/commands/docs/polars_dummies.md b/commands/docs/polars_dummies.md index 650a6210b75..1f9239187ff 100644 --- a/commands/docs/polars_dummies.md +++ b/commands/docs/polars_dummies.md @@ -2,7 +2,7 @@ title: polars dummies categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a new dataframe with dummy variables. usage: | diff --git a/commands/docs/polars_entropy.md b/commands/docs/polars_entropy.md index e9244f441b2..33096f29d4f 100644 --- a/commands/docs/polars_entropy.md +++ b/commands/docs/polars_entropy.md @@ -2,7 +2,7 @@ title: polars entropy categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Compute the entropy as `-sum(pk * log(pk))` where `pk` are discrete probabilities. usage: | @@ -31,6 +31,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Compute the entropy of a column expression diff --git a/commands/docs/polars_explode.md b/commands/docs/polars_explode.md index f428983c9a6..1776656629e 100644 --- a/commands/docs/polars_explode.md +++ b/commands/docs/polars_explode.md @@ -2,7 +2,7 @@ title: polars explode categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Explodes a dataframe or creates a explode expression. usage: | @@ -35,6 +35,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_expr-not.md b/commands/docs/polars_expr-not.md index 8fe273e976a..71201317b59 100644 --- a/commands/docs/polars_expr-not.md +++ b/commands/docs/polars_expr-not.md @@ -2,7 +2,7 @@ title: polars expr-not categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a not expression. usage: | diff --git a/commands/docs/polars_fill-nan.md b/commands/docs/polars_fill-nan.md index b92e868eae6..6aaf5caf54c 100644 --- a/commands/docs/polars_fill-nan.md +++ b/commands/docs/polars_fill-nan.md @@ -2,7 +2,7 @@ title: polars fill-nan categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Replaces NaN values with the given expression. usage: | @@ -27,10 +27,12 @@ contributors: false ## Input/output types: -| input | output | -| ---------------- | ---------------- | -| polars_dataframe | polars_dataframe | -| polars_lazyframe | polars_lazyframe | +| input | output | +| ----------------- | ----------------- | +| polars_dataframe | polars_dataframe | +| polars_lazyframe | polars_lazyframe | +| polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Fills the NaN values with 0 diff --git a/commands/docs/polars_fill-null.md b/commands/docs/polars_fill-null.md index d69665fc7c6..78b5c21fd53 100644 --- a/commands/docs/polars_fill-null.md +++ b/commands/docs/polars_fill-null.md @@ -2,7 +2,7 @@ title: polars fill-null categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Replaces NULL values with the given expression. usage: | @@ -32,6 +32,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Fills the null values by 0 diff --git a/commands/docs/polars_filter-with.md b/commands/docs/polars_filter-with.md index f6da8168c86..461364a7a8a 100644 --- a/commands/docs/polars_filter-with.md +++ b/commands/docs/polars_filter-with.md @@ -2,7 +2,7 @@ title: polars filter-with categories: | dataframe or lazyframe -version: 0.113.0 +version: 0.114.0 dataframe_or_lazyframe: | Filters dataframe using a mask or expression as reference. usage: | diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index 7c3d723a838..7a0206cb43b 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -2,7 +2,7 @@ title: polars filter categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Filter dataframe based in expression. usage: | @@ -32,6 +32,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Filter dataframe using an expression diff --git a/commands/docs/polars_first.md b/commands/docs/polars_first.md index e92f9b3ca01..0f8e1ea0882 100644 --- a/commands/docs/polars_first.md +++ b/commands/docs/polars_first.md @@ -2,7 +2,7 @@ title: polars first categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Show only the first number of rows or create a first expression usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_flatten.md b/commands/docs/polars_flatten.md index 5c9b8c115a6..3645e84512f 100644 --- a/commands/docs/polars_flatten.md +++ b/commands/docs/polars_flatten.md @@ -2,7 +2,7 @@ title: polars flatten categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | An alias for polars explode. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | ## Examples diff --git a/commands/docs/polars_get-day.md b/commands/docs/polars_get-day.md index 6f17f2f6ba0..df59d73d1e2 100644 --- a/commands/docs/polars_get-day.md +++ b/commands/docs/polars_get-day.md @@ -2,7 +2,7 @@ title: polars get-day categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets day from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns day from a date diff --git a/commands/docs/polars_get-hour.md b/commands/docs/polars_get-hour.md index 22c92aec737..1642f4e23e4 100644 --- a/commands/docs/polars_get-hour.md +++ b/commands/docs/polars_get-hour.md @@ -2,7 +2,7 @@ title: polars get-hour categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets hour from datetime. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns hour from a date diff --git a/commands/docs/polars_get-minute.md b/commands/docs/polars_get-minute.md index 7ead6331be3..c3d530080a3 100644 --- a/commands/docs/polars_get-minute.md +++ b/commands/docs/polars_get-minute.md @@ -2,7 +2,7 @@ title: polars get-minute categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets minute from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns minute from a date diff --git a/commands/docs/polars_get-month.md b/commands/docs/polars_get-month.md index 3cd0154391a..f14abcfbc2b 100644 --- a/commands/docs/polars_get-month.md +++ b/commands/docs/polars_get-month.md @@ -2,7 +2,7 @@ title: polars get-month categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets month from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns month from a date diff --git a/commands/docs/polars_get-nanosecond.md b/commands/docs/polars_get-nanosecond.md index b62b1316050..8a39bb5f7a8 100644 --- a/commands/docs/polars_get-nanosecond.md +++ b/commands/docs/polars_get-nanosecond.md @@ -2,7 +2,7 @@ title: polars get-nanosecond categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets nanosecond from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns nanosecond from a date diff --git a/commands/docs/polars_get-ordinal.md b/commands/docs/polars_get-ordinal.md index 8fdc06bcea4..31f1e0941fb 100644 --- a/commands/docs/polars_get-ordinal.md +++ b/commands/docs/polars_get-ordinal.md @@ -2,7 +2,7 @@ title: polars get-ordinal categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets ordinal from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns ordinal from a date diff --git a/commands/docs/polars_get-second.md b/commands/docs/polars_get-second.md index d67cee120a1..6436739d85c 100644 --- a/commands/docs/polars_get-second.md +++ b/commands/docs/polars_get-second.md @@ -2,7 +2,7 @@ title: polars get-second categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets second from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns second from a date diff --git a/commands/docs/polars_get-week.md b/commands/docs/polars_get-week.md index b2607ad9dee..5fe4a1f4a1c 100644 --- a/commands/docs/polars_get-week.md +++ b/commands/docs/polars_get-week.md @@ -2,7 +2,7 @@ title: polars get-week categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets week from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns week from a date diff --git a/commands/docs/polars_get-weekday.md b/commands/docs/polars_get-weekday.md index 2c104633b7b..e98e5a114b9 100644 --- a/commands/docs/polars_get-weekday.md +++ b/commands/docs/polars_get-weekday.md @@ -2,7 +2,7 @@ title: polars get-weekday categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets weekday from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns weekday from a date diff --git a/commands/docs/polars_get-year.md b/commands/docs/polars_get-year.md index ffcf3836e93..6209885dd90 100644 --- a/commands/docs/polars_get-year.md +++ b/commands/docs/polars_get-year.md @@ -2,7 +2,7 @@ title: polars get-year categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets year from date. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns year from a date diff --git a/commands/docs/polars_get.md b/commands/docs/polars_get.md index 80b3d1389bb..00c17fc8a77 100644 --- a/commands/docs/polars_get.md +++ b/commands/docs/polars_get.md @@ -2,7 +2,7 @@ title: polars get categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates dataframe with the selected columns. usage: | diff --git a/commands/docs/polars_group-by.md b/commands/docs/polars_group-by.md index 34cfda089cf..567c525c83f 100644 --- a/commands/docs/polars_group-by.md +++ b/commands/docs/polars_group-by.md @@ -2,7 +2,7 @@ title: polars group-by categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Creates a group-by object that can be used for other aggregations. usage: | diff --git a/commands/docs/polars_horizontal.md b/commands/docs/polars_horizontal.md index 891bc7f3ae1..2fee100a2d7 100644 --- a/commands/docs/polars_horizontal.md +++ b/commands/docs/polars_horizontal.md @@ -2,7 +2,7 @@ title: polars horizontal categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Horizontal calculation across multiple columns. usage: | diff --git a/commands/docs/polars_implode.md b/commands/docs/polars_implode.md index 6f1170ad46f..c38f1aa0f65 100644 --- a/commands/docs/polars_implode.md +++ b/commands/docs/polars_implode.md @@ -2,7 +2,7 @@ title: polars implode categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Aggregates values into a list. usage: | @@ -20,12 +20,17 @@ contributors: false ```> polars implode {flags} ``` +## Flags + + - `--maintain-order, -o`: Maintains the order of the original values in the list + ## Input/output types: | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Create two lists for columns a and b with all the rows as values. diff --git a/commands/docs/polars_integer.md b/commands/docs/polars_integer.md index 97fa8ab0378..36ca461b519 100644 --- a/commands/docs/polars_integer.md +++ b/commands/docs/polars_integer.md @@ -2,7 +2,7 @@ title: polars integer categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts a string column into a integer column usage: | @@ -35,6 +35,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Modifies strings to integer diff --git a/commands/docs/polars_into-df.md b/commands/docs/polars_into-df.md index 06cd2a13ec1..c6f282f1d40 100644 --- a/commands/docs/polars_into-df.md +++ b/commands/docs/polars_into-df.md @@ -2,7 +2,7 @@ title: polars into-df categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts a list, table or record into a dataframe. usage: | diff --git a/commands/docs/polars_into-dtype.md b/commands/docs/polars_into-dtype.md index f373308ae34..4fd715e5e96 100644 --- a/commands/docs/polars_into-dtype.md +++ b/commands/docs/polars_into-dtype.md @@ -2,7 +2,7 @@ title: polars into-dtype categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Convert a string to a specific datatype. usage: | diff --git a/commands/docs/polars_into-lazy.md b/commands/docs/polars_into-lazy.md index ca97e1eb841..115e90091df 100644 --- a/commands/docs/polars_into-lazy.md +++ b/commands/docs/polars_into-lazy.md @@ -2,7 +2,7 @@ title: polars into-lazy categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Converts a dataframe into a lazy dataframe. usage: | diff --git a/commands/docs/polars_into-nu.md b/commands/docs/polars_into-nu.md index 47ae2a52970..4d658c3cbf3 100644 --- a/commands/docs/polars_into-nu.md +++ b/commands/docs/polars_into-nu.md @@ -2,7 +2,7 @@ title: polars into-nu categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Converts a dataframe or an expression into nushell value for access and exploration. usage: | diff --git a/commands/docs/polars_into-repr.md b/commands/docs/polars_into-repr.md index 531b2292e50..704c16200a9 100644 --- a/commands/docs/polars_into-repr.md +++ b/commands/docs/polars_into-repr.md @@ -2,7 +2,7 @@ title: polars into-repr categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Display a dataframe in its repr format. usage: | diff --git a/commands/docs/polars_into-schema.md b/commands/docs/polars_into-schema.md index e3cb175be65..312e5e8e239 100644 --- a/commands/docs/polars_into-schema.md +++ b/commands/docs/polars_into-schema.md @@ -2,7 +2,7 @@ title: polars into-schema categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Convert a value to a polars schema object usage: | diff --git a/commands/docs/polars_is-duplicated.md b/commands/docs/polars_is-duplicated.md index 47fa5a488fb..393a4cec41b 100644 --- a/commands/docs/polars_is-duplicated.md +++ b/commands/docs/polars_is-duplicated.md @@ -2,7 +2,7 @@ title: polars is-duplicated categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates mask indicating duplicated values. usage: | diff --git a/commands/docs/polars_is-in.md b/commands/docs/polars_is-in.md index 419daaa9cc0..0b864a32de8 100644 --- a/commands/docs/polars_is-in.md +++ b/commands/docs/polars_is-in.md @@ -2,7 +2,7 @@ title: polars is-in categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates an is-in expression or checks to see if the elements are contained in the right series usage: | @@ -20,6 +20,10 @@ contributors: false ```> polars is-in {flags} (list)``` +## Flags + + - `--maintain-order, -o`: Maintains the order of the original values in the list + ## Parameters - `list`: List to check if values are in. diff --git a/commands/docs/polars_is-not-null.md b/commands/docs/polars_is-not-null.md index 5353d0b38f4..44923b02df5 100644 --- a/commands/docs/polars_is-not-null.md +++ b/commands/docs/polars_is-not-null.md @@ -2,7 +2,7 @@ title: polars is-not-null categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates mask where value is not null. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_is-null.md b/commands/docs/polars_is-null.md index d137ee98a06..2cb1bda7449 100644 --- a/commands/docs/polars_is-null.md +++ b/commands/docs/polars_is-null.md @@ -2,7 +2,7 @@ title: polars is-null categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates mask where value is null. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_is-unique.md b/commands/docs/polars_is-unique.md index a84b6243344..86c8f011271 100644 --- a/commands/docs/polars_is-unique.md +++ b/commands/docs/polars_is-unique.md @@ -2,7 +2,7 @@ title: polars is-unique categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates mask indicating unique values. usage: | diff --git a/commands/docs/polars_join-where.md b/commands/docs/polars_join-where.md index 5f246d50ff8..afbe63eb2ef 100644 --- a/commands/docs/polars_join-where.md +++ b/commands/docs/polars_join-where.md @@ -2,7 +2,7 @@ title: polars join-where categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Joins a lazy frame with other lazy frame based on conditions. usage: | diff --git a/commands/docs/polars_join.md b/commands/docs/polars_join.md index 7c5dfb8f14c..20921e8e253 100644 --- a/commands/docs/polars_join.md +++ b/commands/docs/polars_join.md @@ -2,7 +2,7 @@ title: polars join categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Joins a lazy frame with other lazy frame. usage: | @@ -118,12 +118,12 @@ Join on column expressions let df2 = [[a c]; ["2025-01-01 00:00:00+0000" a] ["2025-01-02 00:00:00+0000" b]] | polars into-df --schema {a: "datetime", c: str} $df1 | polars join $df2 [(polars col a | polars truncate 1d)] [a] -╭───┬────────────┬───┬────────────┬───╮ -│ # │ a │ b │ a_x │ c │ -├───┼────────────┼───┼────────────┼───┤ -│ 0 │ a year ago │ 1 │ a year ago │ a │ -│ 1 │ a year ago │ 2 │ a year ago │ b │ -╰───┴────────────┴───┴────────────┴───╯ +╭───┬─────────────┬───┬─────────────┬───╮ +│ # │ a │ b │ a_x │ c │ +├───┼─────────────┼───┼─────────────┼───┤ +│ 0 │ 2 years ago │ 1 │ 2 years ago │ a │ +│ 1 │ 2 years ago │ 2 │ 2 years ago │ b │ +╰───┴─────────────┴───┴─────────────┴───╯ ``` diff --git a/commands/docs/polars_last.md b/commands/docs/polars_last.md index 6a27b6611c9..93c6bb5c8f9 100644 --- a/commands/docs/polars_last.md +++ b/commands/docs/polars_last.md @@ -2,7 +2,7 @@ title: polars last categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates new dataframe with tail rows or creates a last expression. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_len.md b/commands/docs/polars_len.md index c61f1ce7d1f..20bc57e79ac 100644 --- a/commands/docs/polars_len.md +++ b/commands/docs/polars_len.md @@ -2,7 +2,7 @@ title: polars len categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Return the number of rows in the context. This is similar to COUNT(*) in SQL. usage: | diff --git a/commands/docs/polars_list-contains.md b/commands/docs/polars_list-contains.md index 672ff23c438..b4b45d50c74 100644 --- a/commands/docs/polars_list-contains.md +++ b/commands/docs/polars_list-contains.md @@ -2,7 +2,7 @@ title: polars list-contains categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Checks if an element is contained in a list. usage: | diff --git a/commands/docs/polars_lit.md b/commands/docs/polars_lit.md index 8d27a1de869..52171167ae4 100644 --- a/commands/docs/polars_lit.md +++ b/commands/docs/polars_lit.md @@ -2,7 +2,7 @@ title: polars lit categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a literal expression. usage: | diff --git a/commands/docs/polars_lowercase.md b/commands/docs/polars_lowercase.md index 6bfd63e502b..5e21f1d6f44 100644 --- a/commands/docs/polars_lowercase.md +++ b/commands/docs/polars_lowercase.md @@ -2,7 +2,7 @@ title: polars lowercase categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Lowercase the strings in the column. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Modifies strings in a column to lowercase diff --git a/commands/docs/polars_map-batches.md b/commands/docs/polars_map-batches.md new file mode 100644 index 00000000000..19fbf554d1c --- /dev/null +++ b/commands/docs/polars_map-batches.md @@ -0,0 +1,85 @@ +--- +title: polars map-batches +categories: | + dataframe +version: 0.114.0 +dataframe: | + Map a custom Nushell closure over one or more dataframe columns. +usage: | + Map a custom Nushell closure over one or more dataframe columns. +editLink: false +contributors: false +--- + + +# `polars map-batches` for [dataframe](/commands/categories/dataframe.md) + +
Map a custom Nushell closure over one or more dataframe columns.
+ +## Signature + +```> polars map-batches {flags} (closure) ...rest``` + +## Flags + + - `--return-dtype, -d {any}`: Data type to cast the closure's result to. + - `--name, -n {string}`: Name for the resulting column. + +## Parameters + + - `closure`: Closure to apply. Receives a list of single-column dataframes. + - `...rest`: Names of columns to pass to the closure. If omitted, all columns are used. + + +## Input/output types: + +| input | output | +| ---------------- | ---------------- | +| polars_dataframe | polars_dataframe | +| polars_lazyframe | polars_dataframe | +## Examples + +Return a constant series from a closure +```nu +> [[a b]; [1 4] [2 5] [3 6]] + | polars into-df + | polars map-batches --name out { |_cols| [10 20 30] } a +╭───┬─────╮ +│ # │ out │ +├───┼─────┤ +│ 0 │ 10 │ +│ 1 │ 20 │ +│ 2 │ 30 │ +╰───┴─────╯ + +``` + +Double the values of column `a` via a Nushell closure +```nu +> [[a b]; [1 4] [2 5] [3 6]] + | polars into-df + | polars map-batches { |cols| $cols | first | polars get a | each { |v| $v * 2 } } a + +``` + +Sum two columns element-wise and rename the result +```nu +> [[a b]; [1 4] [2 5] [3 6]] + | polars into-df + | polars map-batches --name a_plus_b { |cols| + let a = $cols | get 0 | polars get a + let b = $cols | get 1 | polars get b + $a | zip $b | each { |pair| $pair.0 + $pair.1 } + } a b +╭───┬──────────╮ +│ # │ a_plus_b │ +├───┼──────────┤ +│ 0 │ 5 │ +│ 1 │ 7 │ +│ 2 │ 9 │ +╰───┴──────────╯ + +``` + +## Notes +The closure receives a list of single-column dataframes (one per named column) and must return a value that can be converted to a series — a single-column dataframe, a list, or a scalar. The result is returned as a single-column dataframe. The closure is invoked once with all columns at the time `polars map-batches` is run. \ No newline at end of file diff --git a/commands/docs/polars_math.md b/commands/docs/polars_math.md index 875bed4c69c..129276e4e85 100644 --- a/commands/docs/polars_math.md +++ b/commands/docs/polars_math.md @@ -2,11 +2,11 @@ title: polars math categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | - Collection of math functions to be applied on one or more column expressions + Collection of math functions to be applied on column expressions. usage: | - Collection of math functions to be applied on one or more column expressions + Collection of math functions to be applied on column expressions. editLink: false contributors: false --- @@ -14,92 +14,20 @@ contributors: false # `polars math` for [dataframe](/commands/categories/dataframe.md) -
Collection of math functions to be applied on one or more column expressions
+
Collection of math functions to be applied on column expressions.
## Signature -```> polars math {flags} (type) ...rest``` - -## Parameters - - - `type`: Function name. See extra description for full list of accepted values. - - `...rest`: Extra arguments required by some functions. +```> polars math {flags} ``` ## Input/output types: -| input | output | -| ----------------- | ----------------- | -| polars_expression | polars_expression | -| polars_selector | polars_expression | -## Examples - -Apply function to column expression -```nu -> [[a]; [0] [-1] [2] [-3] [4]] - | polars into-df - | polars select [ - (polars col a | polars math abs | polars as a_abs) - (polars col a | polars math sign | polars as a_sign) - (polars col a | polars math exp | polars as a_exp)] - | polars collect -╭───┬───────┬────────┬───────╮ -│ # │ a_abs │ a_sign │ a_exp │ -├───┼───────┼────────┼───────┤ -│ 0 │ 0 │ 0 │ 1.00 │ -│ 1 │ 1 │ -1 │ 0.37 │ -│ 2 │ 2 │ 1 │ 7.39 │ -│ 3 │ 3 │ -1 │ 0.05 │ -│ 4 │ 4 │ 1 │ 54.60 │ -╰───┴───────┴────────┴───────╯ - -``` - -Specify arguments for select functions. See description for more information. -```nu -> [[a]; [0] [1] [2] [4] [8] [16]] - | polars into-df - | polars select [ - (polars col a | polars math log 2 | polars as a_base2)] - | polars collect -╭───┬─────────╮ -│ # │ a_base2 │ -├───┼─────────┤ -│ 0 │ -inf │ -│ 1 │ 0.00 │ -│ 2 │ 1.00 │ -│ 3 │ 2.00 │ -│ 4 │ 3.00 │ -│ 5 │ 4.00 │ -╰───┴─────────╯ - -``` - -Specify arguments for select functions. See description for more information. -```nu -> [[a b]; [0 0] [1 1] [2 2] [3 3] [4 4] [5 5]] - | polars into-df - | polars select [ - (polars col a | polars math dot (polars col b) | polars as ab)] - | polars collect -╭───┬───────╮ -│ # │ ab │ -├───┼───────┤ -│ 0 │ 55.00 │ -╰───┴───────╯ - -``` - +| input | output | +| ------- | ------ | +| nothing | string | ## Notes -This is an incomplete implementation of the available functions listed here: https://docs.pola.rs/api/python/stable/reference/expressions/computation.html. - The following functions are currently available: - - abs - - cos - - dot - - exp - - log - - log1p - - sign - - sin - - sqrt +You must use one of the subcommands below. Using this command as-is will only produce this help message. + +See https://docs.pola.rs/api/python/stable/reference/expressions/computation.html for more information. diff --git a/commands/docs/polars_math_abs.md b/commands/docs/polars_math_abs.md new file mode 100644 index 00000000000..4dda8190320 --- /dev/null +++ b/commands/docs/polars_math_abs.md @@ -0,0 +1,48 @@ +--- +title: polars math abs +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the absolute values of a column expression. +usage: | + Compute the absolute values of a column expression. +editLink: false +contributors: false +--- + + +# `polars math abs` for [dataframe](/commands/categories/dataframe.md) + +
Compute the absolute values of a column expression.
+ +## Signature + +```> polars math abs {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the absolute value of an integer column +```nu +> [[a]; [0] [-1] [2] [-3] [4]] | + polars into-df | + polars select (polars col a | polars math abs) | + polars collect +╭───┬───╮ +│ # │ a │ +├───┼───┤ +│ 0 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 2 │ +│ 3 │ 3 │ +│ 4 │ 4 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_math_bitwise-and.md b/commands/docs/polars_math_bitwise-and.md new file mode 100644 index 00000000000..4b6c578496f --- /dev/null +++ b/commands/docs/polars_math_bitwise-and.md @@ -0,0 +1,44 @@ +--- +title: polars math bitwise-and +categories: | + dataframe +version: 0.114.0 +dataframe: | + Perform an aggregation of bitwise ANDs over a column expression. +usage: | + Perform an aggregation of bitwise ANDs over a column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-and` for [dataframe](/commands/categories/dataframe.md) + +
Perform an aggregation of bitwise ANDs over a column expression.
+ +## Signature + +```> polars math bitwise-and {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Perform an aggregation of bitwise ANDs +```nu +> [[n]; [-1] [-0] [-1]] | + polars into-df | + polars select (polars col n | polars math bitwise-and | polars as n) | + polars collect +╭───┬───╮ +│ # │ n │ +├───┼───┤ +│ 0 │ 0 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_math_bitwise-count-ones.md b/commands/docs/polars_math_bitwise-count-ones.md new file mode 100644 index 00000000000..ff15a2ebae8 --- /dev/null +++ b/commands/docs/polars_math_bitwise-count-ones.md @@ -0,0 +1,47 @@ +--- +title: polars math bitwise-count-ones +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of set bits for each element in an integer column expression. +usage: | + Compute the number of set bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-count-ones` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of set bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-count-ones {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of set bits for each element in an integer column +```nu +> [[n]; [0] [1] [7] [255]] | + polars into-df | + polars select (polars col n | polars math bitwise-count-ones) | + polars collect +╭───┬───╮ +│ # │ n │ +├───┼───┤ +│ 0 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 3 │ +│ 3 │ 8 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_math_bitwise-count-zeros.md b/commands/docs/polars_math_bitwise-count-zeros.md new file mode 100644 index 00000000000..c3c6813a201 --- /dev/null +++ b/commands/docs/polars_math_bitwise-count-zeros.md @@ -0,0 +1,47 @@ +--- +title: polars math bitwise-count-zeros +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of unset bits for each element in an integer column expression. +usage: | + Compute the number of unset bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-count-zeros` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of unset bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-count-zeros {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of unset bits for each element in an integer column +```nu +> [[n]; [0] [1] [7] [255]] | + polars into-df | + polars select (polars col n | polars math bitwise-count-zeros) | + polars collect +╭───┬────╮ +│ # │ n │ +├───┼────┤ +│ 0 │ 64 │ +│ 1 │ 63 │ +│ 2 │ 61 │ +│ 3 │ 56 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_bitwise-leading-ones.md b/commands/docs/polars_math_bitwise-leading-ones.md new file mode 100644 index 00000000000..dfccfe03bd2 --- /dev/null +++ b/commands/docs/polars_math_bitwise-leading-ones.md @@ -0,0 +1,46 @@ +--- +title: polars math bitwise-leading-ones +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of leading set bits for each element in an integer column expression. +usage: | + Compute the number of leading set bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-leading-ones` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of leading set bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-leading-ones {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of leading set bits for each element in an integer column +```nu +> [[n]; [0] [-1] [127]] | + polars into-df | + polars select (polars col n | polars math bitwise-leading-ones) | + polars collect +╭───┬────╮ +│ # │ n │ +├───┼────┤ +│ 0 │ 0 │ +│ 1 │ 64 │ +│ 2 │ 0 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_bitwise-leading-zeros.md b/commands/docs/polars_math_bitwise-leading-zeros.md new file mode 100644 index 00000000000..49951673e50 --- /dev/null +++ b/commands/docs/polars_math_bitwise-leading-zeros.md @@ -0,0 +1,46 @@ +--- +title: polars math bitwise-leading-zeros +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of leading unset bits for each element in an integer column expression. +usage: | + Compute the number of leading unset bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-leading-zeros` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of leading unset bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-leading-zeros {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of leading unset bits for each element in an integer column +```nu +> [[n]; [0] [1] [255]] | + polars into-df | + polars select (polars col n | polars math bitwise-leading-zeros) | + polars collect +╭───┬────╮ +│ # │ n │ +├───┼────┤ +│ 0 │ 64 │ +│ 1 │ 63 │ +│ 2 │ 56 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_bitwise-or.md b/commands/docs/polars_math_bitwise-or.md new file mode 100644 index 00000000000..087bc780213 --- /dev/null +++ b/commands/docs/polars_math_bitwise-or.md @@ -0,0 +1,44 @@ +--- +title: polars math bitwise-or +categories: | + dataframe +version: 0.114.0 +dataframe: | + Perform an aggregation of bitwise ORs over a column expression. +usage: | + Perform an aggregation of bitwise ORs over a column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-or` for [dataframe](/commands/categories/dataframe.md) + +
Perform an aggregation of bitwise ORs over a column expression.
+ +## Signature + +```> polars math bitwise-or {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Perform an aggregation of bitwise ORs +```nu +> [[n]; [-1] [-0] [-1]] | + polars into-df | + polars select (polars col n | polars math bitwise-or | polars as n) | + polars collect +╭───┬────╮ +│ # │ n │ +├───┼────┤ +│ 0 │ -1 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_bitwise-trailing-ones.md b/commands/docs/polars_math_bitwise-trailing-ones.md new file mode 100644 index 00000000000..6c81558f4a9 --- /dev/null +++ b/commands/docs/polars_math_bitwise-trailing-ones.md @@ -0,0 +1,47 @@ +--- +title: polars math bitwise-trailing-ones +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of trailing set bits for each element in an integer column expression. +usage: | + Compute the number of trailing set bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-trailing-ones` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of trailing set bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-trailing-ones {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of trailing set bits for each element in an integer column +```nu +> [[n]; [0] [1] [3] [7]] | + polars into-df | + polars select (polars col n | polars math bitwise-trailing-ones) | + polars collect +╭───┬───╮ +│ # │ n │ +├───┼───┤ +│ 0 │ 0 │ +│ 1 │ 1 │ +│ 2 │ 2 │ +│ 3 │ 3 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_math_bitwise-trailing-zeros.md b/commands/docs/polars_math_bitwise-trailing-zeros.md new file mode 100644 index 00000000000..9f839f14541 --- /dev/null +++ b/commands/docs/polars_math_bitwise-trailing-zeros.md @@ -0,0 +1,47 @@ +--- +title: polars math bitwise-trailing-zeros +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the number of trailing unset bits for each element in an integer column expression. +usage: | + Compute the number of trailing unset bits for each element in an integer column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-trailing-zeros` for [dataframe](/commands/categories/dataframe.md) + +
Compute the number of trailing unset bits for each element in an integer column expression.
+ +## Signature + +```> polars math bitwise-trailing-zeros {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Count the number of trailing unset bits for each element in an integer column +```nu +> [[n]; [0] [1] [4] [8]] | + polars into-df | + polars select (polars col n | polars math bitwise-trailing-zeros) | + polars collect +╭───┬────╮ +│ # │ n │ +├───┼────┤ +│ 0 │ 64 │ +│ 1 │ 0 │ +│ 2 │ 2 │ +│ 3 │ 3 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_bitwise-xor.md b/commands/docs/polars_math_bitwise-xor.md new file mode 100644 index 00000000000..d4de52340f8 --- /dev/null +++ b/commands/docs/polars_math_bitwise-xor.md @@ -0,0 +1,44 @@ +--- +title: polars math bitwise-xor +categories: | + dataframe +version: 0.114.0 +dataframe: | + Perform an aggregation of bitwise XORs over a column expression. +usage: | + Perform an aggregation of bitwise XORs over a column expression. +editLink: false +contributors: false +--- + + +# `polars math bitwise-xor` for [dataframe](/commands/categories/dataframe.md) + +
Perform an aggregation of bitwise XORs over a column expression.
+ +## Signature + +```> polars math bitwise-xor {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Perform an aggregation of bitwise XORs +```nu +> [[n]; [7] [5]] | + polars into-df | + polars select (polars col n | polars math bitwise-xor | polars as n) | + polars collect +╭───┬───╮ +│ # │ n │ +├───┼───┤ +│ 0 │ 2 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_math_cos.md b/commands/docs/polars_math_cos.md new file mode 100644 index 00000000000..73a7049861f --- /dev/null +++ b/commands/docs/polars_math_cos.md @@ -0,0 +1,45 @@ +--- +title: polars math cos +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise cosine of a column expression. +usage: | + Compute the element-wise cosine of a column expression. +editLink: false +contributors: false +--- + + +# `polars math cos` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise cosine of a column expression.
+ +## Signature + +```> polars math cos {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the element-wise cosine of a float column +```nu +> [[a]; [0.0] [3.141592653589793]] | + polars into-df | + polars select (polars col a | polars math cos) | + polars collect +╭───┬───────╮ +│ # │ a │ +├───┼───────┤ +│ 0 │ 1.00 │ +│ 1 │ -1.00 │ +╰───┴───────╯ + +``` diff --git a/commands/docs/polars_math_dot.md b/commands/docs/polars_math_dot.md new file mode 100644 index 00000000000..9f150227cfd --- /dev/null +++ b/commands/docs/polars_math_dot.md @@ -0,0 +1,48 @@ +--- +title: polars math dot +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the dot product of two column expressions. +usage: | + Compute the dot product of two column expressions. +editLink: false +contributors: false +--- + + +# `polars math dot` for [dataframe](/commands/categories/dataframe.md) + +
Compute the dot product of two column expressions.
+ +## Signature + +```> polars math dot {flags} (other)``` + +## Parameters + + - `other`: Expression to compute dot product with. + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the dot product of two integer columns +```nu +> [[a b]; [0 0] [1 1] [2 2] [3 3] [4 4] [5 5]] | + polars into-df | + polars select (polars col a | polars math dot (polars col b) | polars as ab) | + polars collect +╭───┬───────╮ +│ # │ ab │ +├───┼───────┤ +│ 0 │ 55.00 │ +╰───┴───────╯ + +``` diff --git a/commands/docs/polars_math_exp.md b/commands/docs/polars_math_exp.md new file mode 100644 index 00000000000..72cc70cf47e --- /dev/null +++ b/commands/docs/polars_math_exp.md @@ -0,0 +1,39 @@ +--- +title: polars math exp +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute element-wise e raised to the power of a column expression. +usage: | + Compute element-wise e raised to the power of a column expression. +editLink: false +contributors: false +--- + + +# `polars math exp` for [dataframe](/commands/categories/dataframe.md) + +
Compute element-wise e raised to the power of a column expression.
+ +## Signature + +```> polars math exp {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute element-wise e raised to the power of a column +```nu +> [[a]; [0] [1] [2]] | + polars into-df | + polars select (polars col a | polars math exp) | + polars collect + +``` diff --git a/commands/docs/polars_math_log.md b/commands/docs/polars_math_log.md new file mode 100644 index 00000000000..655e0214bd6 --- /dev/null +++ b/commands/docs/polars_math_log.md @@ -0,0 +1,53 @@ +--- +title: polars math log +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise logarithm of a column expression. +usage: | + Compute the element-wise logarithm of a column expression. +editLink: false +contributors: false +--- + + +# `polars math log` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise logarithm of a column expression.
+ +## Signature + +```> polars math log {flags} (base)``` + +## Parameters + + - `base`: Logarithm base (default: e, the natural logarithm). + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the base-2 logarithm of a column +```nu +> [[a]; [0] [1] [2] [4] [8] [16]] | + polars into-df | + polars select (polars col a | polars math log 2 | polars as a_base2) | + polars collect +╭───┬─────────╮ +│ # │ a_base2 │ +├───┼─────────┤ +│ 0 │ -inf │ +│ 1 │ 0.00 │ +│ 2 │ 1.00 │ +│ 3 │ 2.00 │ +│ 4 │ 3.00 │ +│ 5 │ 4.00 │ +╰───┴─────────╯ + +``` diff --git a/commands/docs/polars_math_log1p.md b/commands/docs/polars_math_log1p.md new file mode 100644 index 00000000000..caaa1635474 --- /dev/null +++ b/commands/docs/polars_math_log1p.md @@ -0,0 +1,39 @@ +--- +title: polars math log1p +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise natural log of 1 + x for a column expression. +usage: | + Compute the element-wise natural log of 1 + x for a column expression. +editLink: false +contributors: false +--- + + +# `polars math log1p` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise natural log of 1 + x for a column expression.
+ +## Signature + +```> polars math log1p {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the element-wise natural log of 1 + x for a column +```nu +> [[a]; [0] [1] [2]] | + polars into-df | + polars select (polars col a | polars math log1p) | + polars collect + +``` diff --git a/commands/docs/polars_math_sign.md b/commands/docs/polars_math_sign.md new file mode 100644 index 00000000000..976db8d9e78 --- /dev/null +++ b/commands/docs/polars_math_sign.md @@ -0,0 +1,45 @@ +--- +title: polars math sign +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise sign of a column expression, returning -1, 0, or 1. +usage: | + Compute the element-wise sign of a column expression, returning -1, 0, or 1. +editLink: false +contributors: false +--- + + +# `polars math sign` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise sign of a column expression, returning -1, 0, or 1.
+ +## Signature + +```> polars math sign {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the element-wise sign of an integer column +```nu +> [[a]; [0] [-1] [2] [-3] [4]] | polars into-df | polars select (polars col a | polars math sign) | polars collect +╭───┬────╮ +│ # │ a │ +├───┼────┤ +│ 0 │ 0 │ +│ 1 │ -1 │ +│ 2 │ 1 │ +│ 3 │ -1 │ +│ 4 │ 1 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_math_sin.md b/commands/docs/polars_math_sin.md new file mode 100644 index 00000000000..1421d8be442 --- /dev/null +++ b/commands/docs/polars_math_sin.md @@ -0,0 +1,42 @@ +--- +title: polars math sin +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise sine of a column expression. +usage: | + Compute the element-wise sine of a column expression. +editLink: false +contributors: false +--- + + +# `polars math sin` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise sine of a column expression.
+ +## Signature + +```> polars math sin {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the element-wise sine of a float column +```nu +> [[a]; [0.0] [1.5707963267948966]] | polars into-df | polars select (polars col a | polars math sin) | polars collect +╭───┬──────╮ +│ # │ a │ +├───┼──────┤ +│ 0 │ 0.00 │ +│ 1 │ 1.00 │ +╰───┴──────╯ + +``` diff --git a/commands/docs/polars_math_sqrt.md b/commands/docs/polars_math_sqrt.md new file mode 100644 index 00000000000..41362d46d42 --- /dev/null +++ b/commands/docs/polars_math_sqrt.md @@ -0,0 +1,45 @@ +--- +title: polars math sqrt +categories: | + dataframe +version: 0.114.0 +dataframe: | + Compute the element-wise square root of a column expression. +usage: | + Compute the element-wise square root of a column expression. +editLink: false +contributors: false +--- + + +# `polars math sqrt` for [dataframe](/commands/categories/dataframe.md) + +
Compute the element-wise square root of a column expression.
+ +## Signature + +```> polars math sqrt {flags} ``` + + +## Input/output types: + +| input | output | +| ----------------- | ----------------- | +| polars_expression | polars_expression | +| polars_selector | polars_expression | +## Examples + +Compute the element-wise square root of a column +```nu +> [[a]; [0] [1] [4] [9] [16]] | polars into-df | polars select (polars col a | polars math sqrt) | polars collect +╭───┬──────╮ +│ # │ a │ +├───┼──────┤ +│ 0 │ 0.00 │ +│ 1 │ 1.00 │ +│ 2 │ 2.00 │ +│ 3 │ 3.00 │ +│ 4 │ 4.00 │ +╰───┴──────╯ + +``` diff --git a/commands/docs/polars_max.md b/commands/docs/polars_max.md index 4b4dcb0af99..f1ec1b5e610 100644 --- a/commands/docs/polars_max.md +++ b/commands/docs/polars_max.md @@ -2,7 +2,7 @@ title: polars max categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a max expression or aggregates columns to their max value. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_mean.md b/commands/docs/polars_mean.md index caa1006faae..d3e2596675b 100644 --- a/commands/docs/polars_mean.md +++ b/commands/docs/polars_mean.md @@ -2,7 +2,7 @@ title: polars mean categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a mean expression for an aggregation or aggregates columns to their mean value. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_median.md b/commands/docs/polars_median.md index c2781d71f6f..a506245b97a 100644 --- a/commands/docs/polars_median.md +++ b/commands/docs/polars_median.md @@ -2,7 +2,7 @@ title: polars median categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Median value from columns in a dataframe or creates expression for an aggregation usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_min.md b/commands/docs/polars_min.md index e92fa045ddc..9d65cc3b15f 100644 --- a/commands/docs/polars_min.md +++ b/commands/docs/polars_min.md @@ -2,7 +2,7 @@ title: polars min categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a min expression or aggregates columns to their min value. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_n-unique.md b/commands/docs/polars_n-unique.md index 47d82467246..fd691f521c5 100644 --- a/commands/docs/polars_n-unique.md +++ b/commands/docs/polars_n-unique.md @@ -2,7 +2,7 @@ title: polars n-unique categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Counts unique values. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_not.md b/commands/docs/polars_not.md index c6c02ce72ee..f2896e2278d 100644 --- a/commands/docs/polars_not.md +++ b/commands/docs/polars_not.md @@ -2,7 +2,7 @@ title: polars not categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Inverts boolean mask. usage: | diff --git a/commands/docs/polars_open.md b/commands/docs/polars_open.md index d94cf81a394..cf8700b36d0 100644 --- a/commands/docs/polars_open.md +++ b/commands/docs/polars_open.md @@ -2,7 +2,7 @@ title: polars open categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Opens CSV, JSON, NDJSON/JSON lines, arrow, avro, or parquet file to create dataframe. A lazy dataframe will be created by default, if supported. usage: | diff --git a/commands/docs/polars_otherwise.md b/commands/docs/polars_otherwise.md index f65131b87b6..e59cfa187a7 100644 --- a/commands/docs/polars_otherwise.md +++ b/commands/docs/polars_otherwise.md @@ -2,7 +2,7 @@ title: polars otherwise categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Completes a when expression. usage: | diff --git a/commands/docs/polars_over.md b/commands/docs/polars_over.md index df5c2734916..4b808c61a44 100644 --- a/commands/docs/polars_over.md +++ b/commands/docs/polars_over.md @@ -2,7 +2,7 @@ title: polars over categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Compute expressions over a window group defined by partition expressions. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Compute expression over an aggregation window diff --git a/commands/docs/polars_pivot.md b/commands/docs/polars_pivot.md index 439c452b363..f55939ad93d 100644 --- a/commands/docs/polars_pivot.md +++ b/commands/docs/polars_pivot.md @@ -2,7 +2,7 @@ title: polars pivot categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Pivot a DataFrame from long to wide format. usage: | @@ -31,6 +31,7 @@ contributors: false - `--maintain-order`: Maintain Order. - `--streamable, -t`: Whether or not to use the polars streaming engine. Only valid for lazy dataframes - `--stable`: Perform a stable pivot. + - `--always-combine-names`: Always combine the values and on-column names. ## Input/output types: diff --git a/commands/docs/polars_profile.md b/commands/docs/polars_profile.md index ace61916db1..9beeb9a59b8 100644 --- a/commands/docs/polars_profile.md +++ b/commands/docs/polars_profile.md @@ -2,7 +2,7 @@ title: polars profile categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Profile a lazy dataframe. usage: | diff --git a/commands/docs/polars_qcut.md b/commands/docs/polars_qcut.md index 0698608e69c..563b7240a54 100644 --- a/commands/docs/polars_qcut.md +++ b/commands/docs/polars_qcut.md @@ -2,7 +2,7 @@ title: polars qcut categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Bin continuous values into discrete categories based on their quantiles for a series. usage: | diff --git a/commands/docs/polars_quantile.md b/commands/docs/polars_quantile.md index 9c42c781cfb..9df3ece0350 100644 --- a/commands/docs/polars_quantile.md +++ b/commands/docs/polars_quantile.md @@ -2,7 +2,7 @@ title: polars quantile categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Aggregates the columns to the selected quantile. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_query.md b/commands/docs/polars_query.md index 0ee268942ed..a5e74e2c196 100644 --- a/commands/docs/polars_query.md +++ b/commands/docs/polars_query.md @@ -2,7 +2,7 @@ title: polars query categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. usage: | diff --git a/commands/docs/polars_rename.md b/commands/docs/polars_rename.md index 5812cc40abf..9506e0d998b 100644 --- a/commands/docs/polars_rename.md +++ b/commands/docs/polars_rename.md @@ -2,7 +2,7 @@ title: polars rename categories: | dataframe or lazyframe -version: 0.113.0 +version: 0.114.0 dataframe_or_lazyframe: | Rename a dataframe column. usage: | diff --git a/commands/docs/polars_replace-time-zone.md b/commands/docs/polars_replace-time-zone.md index 7bf0a595bae..40e6578f26a 100644 --- a/commands/docs/polars_replace-time-zone.md +++ b/commands/docs/polars_replace-time-zone.md @@ -2,7 +2,7 @@ title: polars replace-time-zone categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Replace the timezone information in a datetime column. usage: | @@ -65,10 +65,10 @@ Apply timezone with ambiguous datetime ╭───┬──────────────╮ │ # │ datetime │ ├───┼──────────────┤ -│ 0 │ 6 months ago │ +│ 0 │ 8 months ago │ │ 1 │ │ -│ 2 │ 6 months ago │ -│ 3 │ 6 months ago │ +│ 2 │ 8 months ago │ +│ 3 │ 8 months ago │ ╰───┴──────────────╯ ``` diff --git a/commands/docs/polars_replace.md b/commands/docs/polars_replace.md index f0348502c89..6749133ac11 100644 --- a/commands/docs/polars_replace.md +++ b/commands/docs/polars_replace.md @@ -2,7 +2,7 @@ title: polars replace categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Create an expression that replaces old values with new values usage: | @@ -37,6 +37,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Replace column with different values of same type @@ -128,7 +129,7 @@ Replace column with different values using a record ```nu > [[a]; [1] [1] [2] [2]] | polars into-df - | polars select (polars col a | polars replace {1: a, 2: b} --strict --return-dtype str) + | polars select (polars col a | polars replace {1: a, 2: b} --default c --strict --return-dtype str) | polars collect ╭───┬───╮ │ # │ a │ diff --git a/commands/docs/polars_reverse.md b/commands/docs/polars_reverse.md index 8ec4b6a7fbd..261b526ee70 100644 --- a/commands/docs/polars_reverse.md +++ b/commands/docs/polars_reverse.md @@ -2,7 +2,7 @@ title: polars reverse categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Reverses the LazyFrame usage: | diff --git a/commands/docs/polars_rolling.md b/commands/docs/polars_rolling.md index 7daf857d194..ce5b7d5e7a5 100644 --- a/commands/docs/polars_rolling.md +++ b/commands/docs/polars_rolling.md @@ -2,7 +2,7 @@ title: polars rolling categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Rolling calculation for a series. usage: | diff --git a/commands/docs/polars_sample.md b/commands/docs/polars_sample.md index 10c98035212..ee5eae21f0f 100644 --- a/commands/docs/polars_sample.md +++ b/commands/docs/polars_sample.md @@ -2,7 +2,7 @@ title: polars sample categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Create sample dataframe. usage: | diff --git a/commands/docs/polars_save.md b/commands/docs/polars_save.md index 8a9bc3fd17d..28f5250771e 100644 --- a/commands/docs/polars_save.md +++ b/commands/docs/polars_save.md @@ -2,7 +2,7 @@ title: polars save categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Saves a dataframe to disk. For lazy dataframes a sink operation will be used if the file type supports it (parquet, ipc/arrow, csv, and ndjson). usage: | diff --git a/commands/docs/polars_schema.md b/commands/docs/polars_schema.md index 6f8c8a3d969..230af031259 100644 --- a/commands/docs/polars_schema.md +++ b/commands/docs/polars_schema.md @@ -2,7 +2,7 @@ title: polars schema categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Show schema for a dataframe. usage: | diff --git a/commands/docs/polars_select.md b/commands/docs/polars_select.md index 486af93c49f..4c769b1cc04 100644 --- a/commands/docs/polars_select.md +++ b/commands/docs/polars_select.md @@ -2,7 +2,7 @@ title: polars select categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Selects columns from lazyframe. usage: | diff --git a/commands/docs/polars_selector.md b/commands/docs/polars_selector.md index 4376401ba35..3040ffe5f4b 100644 --- a/commands/docs/polars_selector.md +++ b/commands/docs/polars_selector.md @@ -2,7 +2,7 @@ title: polars selector categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Create column selectors for use in polars commands. usage: | diff --git a/commands/docs/polars_selector_all.md b/commands/docs/polars_selector_all.md index 55054112635..e54057e714d 100644 --- a/commands/docs/polars_selector_all.md +++ b/commands/docs/polars_selector_all.md @@ -2,7 +2,7 @@ title: polars selector all categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a selector that selects all columns. usage: | diff --git a/commands/docs/polars_selector_alpha.md b/commands/docs/polars_selector_alpha.md index 061df2dbca1..b0449d0a28c 100644 --- a/commands/docs/polars_selector_alpha.md +++ b/commands/docs/polars_selector_alpha.md @@ -2,7 +2,7 @@ title: polars selector alpha categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all columns with alphabetic names (eg: only letters). Matching column names cannot contain *any* non-alphabetic characters. Note that the definition of "alphabetic" consists of all valid Unicode alphabetic characters by default; this can be changed by setting `--ascii-only`. usage: | diff --git a/commands/docs/polars_selector_alphanumeric.md b/commands/docs/polars_selector_alphanumeric.md index fc9549c4e18..b842c9a925f 100644 --- a/commands/docs/polars_selector_alphanumeric.md +++ b/commands/docs/polars_selector_alphanumeric.md @@ -2,7 +2,7 @@ title: polars selector alphanumeric categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all columns with alphanumeric names (eg: only letters). Matching column names cannot contain *any* non-alphanumeric characters. Note that the definition of "alphanumeric" consists of all valid Unicode alphanumeric characters by default; this can be changed by setting `ascii_only=true`. usage: | diff --git a/commands/docs/polars_selector_array.md b/commands/docs/polars_selector_array.md index 220bfa2d98d..6df2390efb5 100644 --- a/commands/docs/polars_selector_array.md +++ b/commands/docs/polars_selector_array.md @@ -2,7 +2,7 @@ title: polars selector array categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all array columns. Optionally filter by fixed width. usage: | diff --git a/commands/docs/polars_selector_binary.md b/commands/docs/polars_selector_binary.md index 1f44b5eafcb..8f29bd8257f 100644 --- a/commands/docs/polars_selector_binary.md +++ b/commands/docs/polars_selector_binary.md @@ -2,7 +2,7 @@ title: polars selector binary categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all binary columns. usage: | diff --git a/commands/docs/polars_selector_boolean.md b/commands/docs/polars_selector_boolean.md index 7c6505e78d7..407b6324b4d 100644 --- a/commands/docs/polars_selector_boolean.md +++ b/commands/docs/polars_selector_boolean.md @@ -2,7 +2,7 @@ title: polars selector boolean categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all boolean columns. usage: | diff --git a/commands/docs/polars_selector_by-dtype.md b/commands/docs/polars_selector_by-dtype.md index 8c81783de73..d276033119c 100644 --- a/commands/docs/polars_selector_by-dtype.md +++ b/commands/docs/polars_selector_by-dtype.md @@ -2,7 +2,7 @@ title: polars selector by-dtype categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a selector that selects columns by data type. usage: | diff --git a/commands/docs/polars_selector_by-index.md b/commands/docs/polars_selector_by-index.md index 61ff0f8e7eb..88f3ab0045e 100644 --- a/commands/docs/polars_selector_by-index.md +++ b/commands/docs/polars_selector_by-index.md @@ -2,7 +2,7 @@ title: polars selector by-index categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select columns by their index position. Supports negative indices (e.g., -1 for the last column). usage: | diff --git a/commands/docs/polars_selector_by-name.md b/commands/docs/polars_selector_by-name.md index f17b461fd3d..41d944006cf 100644 --- a/commands/docs/polars_selector_by-name.md +++ b/commands/docs/polars_selector_by-name.md @@ -2,7 +2,7 @@ title: polars selector by-name categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a selector that selects columns by name. usage: | diff --git a/commands/docs/polars_selector_categorical.md b/commands/docs/polars_selector_categorical.md index f3c20e0d5d8..53bc8590391 100644 --- a/commands/docs/polars_selector_categorical.md +++ b/commands/docs/polars_selector_categorical.md @@ -2,7 +2,7 @@ title: polars selector categorical categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all categorical columns. usage: | diff --git a/commands/docs/polars_selector_contains.md b/commands/docs/polars_selector_contains.md index 2eb71d0d14c..563d8a66f7b 100644 --- a/commands/docs/polars_selector_contains.md +++ b/commands/docs/polars_selector_contains.md @@ -2,7 +2,7 @@ title: polars selector contains categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select columns whose names contain the given literal substring(s). usage: | diff --git a/commands/docs/polars_selector_date.md b/commands/docs/polars_selector_date.md index fd5a9df899c..c6f2cb51732 100644 --- a/commands/docs/polars_selector_date.md +++ b/commands/docs/polars_selector_date.md @@ -2,7 +2,7 @@ title: polars selector date categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all date columns. usage: | diff --git a/commands/docs/polars_selector_datetime.md b/commands/docs/polars_selector_datetime.md index 780974661dd..15fa8178c22 100644 --- a/commands/docs/polars_selector_datetime.md +++ b/commands/docs/polars_selector_datetime.md @@ -2,7 +2,7 @@ title: polars selector datetime categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all datetime columns. Optionally filter by time unit (ns, us, ms) and/or timezone. usage: | diff --git a/commands/docs/polars_selector_decimal.md b/commands/docs/polars_selector_decimal.md index 6db47628230..f4f95316d85 100644 --- a/commands/docs/polars_selector_decimal.md +++ b/commands/docs/polars_selector_decimal.md @@ -2,7 +2,7 @@ title: polars selector decimal categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all decimal columns. usage: | diff --git a/commands/docs/polars_selector_digit.md b/commands/docs/polars_selector_digit.md index 2d8ecec10fc..95c27956ea3 100644 --- a/commands/docs/polars_selector_digit.md +++ b/commands/docs/polars_selector_digit.md @@ -2,7 +2,7 @@ title: polars selector digit categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select columns whose names consist entirely of digit characters. By default uses Unicode decimal digits; use `--ascii-only` to restrict to ASCII 0-9. usage: | diff --git a/commands/docs/polars_selector_duration.md b/commands/docs/polars_selector_duration.md index 9650f0e16a7..4e721b367b2 100644 --- a/commands/docs/polars_selector_duration.md +++ b/commands/docs/polars_selector_duration.md @@ -2,7 +2,7 @@ title: polars selector duration categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all duration columns. Optionally filter by time unit (ns, us, ms). usage: | diff --git a/commands/docs/polars_selector_empty.md b/commands/docs/polars_selector_empty.md index dd639dc4ec3..6ab4b0df287 100644 --- a/commands/docs/polars_selector_empty.md +++ b/commands/docs/polars_selector_empty.md @@ -2,7 +2,7 @@ title: polars selector empty categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Create an empty selector that matches no columns. Useful as a base for selector composition. usage: | diff --git a/commands/docs/polars_selector_ends-with.md b/commands/docs/polars_selector_ends-with.md index ba0464163e4..06e3c9f54f2 100644 --- a/commands/docs/polars_selector_ends-with.md +++ b/commands/docs/polars_selector_ends-with.md @@ -2,7 +2,7 @@ title: polars selector ends-with categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select columns that end with the given substring(s). usage: | diff --git a/commands/docs/polars_selector_enum.md b/commands/docs/polars_selector_enum.md index 48d32d6421c..ecd21327510 100644 --- a/commands/docs/polars_selector_enum.md +++ b/commands/docs/polars_selector_enum.md @@ -2,7 +2,7 @@ title: polars selector enum categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all enum columns. usage: | diff --git a/commands/docs/polars_selector_exclude.md b/commands/docs/polars_selector_exclude.md index 67801114c0d..398c1295a1f 100644 --- a/commands/docs/polars_selector_exclude.md +++ b/commands/docs/polars_selector_exclude.md @@ -2,7 +2,7 @@ title: polars selector exclude categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all columns except those with the given name(s). This is the inverse of `polars selector by-name`. usage: | diff --git a/commands/docs/polars_selector_first.md b/commands/docs/polars_selector_first.md index e0c5df1b8be..4a78e57b757 100644 --- a/commands/docs/polars_selector_first.md +++ b/commands/docs/polars_selector_first.md @@ -2,7 +2,7 @@ title: polars selector first categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a selector that selects the first column(s) by index. usage: | diff --git a/commands/docs/polars_selector_float.md b/commands/docs/polars_selector_float.md index 8a03e300b0b..2cd32758719 100644 --- a/commands/docs/polars_selector_float.md +++ b/commands/docs/polars_selector_float.md @@ -2,7 +2,7 @@ title: polars selector float categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all float columns. usage: | diff --git a/commands/docs/polars_selector_integer.md b/commands/docs/polars_selector_integer.md index 87f0ebeeb02..436ded8e4f6 100644 --- a/commands/docs/polars_selector_integer.md +++ b/commands/docs/polars_selector_integer.md @@ -2,7 +2,7 @@ title: polars selector integer categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all integer columns. usage: | diff --git a/commands/docs/polars_selector_last.md b/commands/docs/polars_selector_last.md index 2733f53c542..c6048ee0b28 100644 --- a/commands/docs/polars_selector_last.md +++ b/commands/docs/polars_selector_last.md @@ -2,7 +2,7 @@ title: polars selector last categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates a selector that selects the last column(s) by index. usage: | diff --git a/commands/docs/polars_selector_list.md b/commands/docs/polars_selector_list.md index 04bf719744b..f4a8e527822 100644 --- a/commands/docs/polars_selector_list.md +++ b/commands/docs/polars_selector_list.md @@ -2,7 +2,7 @@ title: polars selector list categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all list columns. usage: | diff --git a/commands/docs/polars_selector_matches.md b/commands/docs/polars_selector_matches.md index 677eaea48d0..5c710fda72d 100644 --- a/commands/docs/polars_selector_matches.md +++ b/commands/docs/polars_selector_matches.md @@ -2,7 +2,7 @@ title: polars selector matches categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all columns that match the given regex pattern. usage: | diff --git a/commands/docs/polars_selector_nested.md b/commands/docs/polars_selector_nested.md index 6181969448b..2447e5d157d 100644 --- a/commands/docs/polars_selector_nested.md +++ b/commands/docs/polars_selector_nested.md @@ -2,7 +2,7 @@ title: polars selector nested categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all nested columns (list, array, or struct). usage: | diff --git a/commands/docs/polars_selector_not.md b/commands/docs/polars_selector_not.md index f73bf270982..496133dfdfd 100644 --- a/commands/docs/polars_selector_not.md +++ b/commands/docs/polars_selector_not.md @@ -2,7 +2,7 @@ title: polars selector not categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Inverts selector. usage: | diff --git a/commands/docs/polars_selector_numeric.md b/commands/docs/polars_selector_numeric.md index f81ccc52c52..5bcb0426f64 100644 --- a/commands/docs/polars_selector_numeric.md +++ b/commands/docs/polars_selector_numeric.md @@ -2,7 +2,7 @@ title: polars selector numeric categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all numeric columns. usage: | diff --git a/commands/docs/polars_selector_object.md b/commands/docs/polars_selector_object.md index 5bd6d9a5ec7..980cf09683d 100644 --- a/commands/docs/polars_selector_object.md +++ b/commands/docs/polars_selector_object.md @@ -2,7 +2,7 @@ title: polars selector object categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all object columns. usage: | diff --git a/commands/docs/polars_selector_signed-integer.md b/commands/docs/polars_selector_signed-integer.md index a9b29c5610a..9a37fc93b47 100644 --- a/commands/docs/polars_selector_signed-integer.md +++ b/commands/docs/polars_selector_signed-integer.md @@ -2,7 +2,7 @@ title: polars selector signed-integer categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all signed integer columns. usage: | diff --git a/commands/docs/polars_selector_starts-with.md b/commands/docs/polars_selector_starts-with.md index b527b6b881e..95f69606825 100644 --- a/commands/docs/polars_selector_starts-with.md +++ b/commands/docs/polars_selector_starts-with.md @@ -2,7 +2,7 @@ title: polars selector starts-with categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select columns that start with the given substring(s). usage: | diff --git a/commands/docs/polars_selector_string.md b/commands/docs/polars_selector_string.md index aeb3b39c4c5..610a079f02f 100644 --- a/commands/docs/polars_selector_string.md +++ b/commands/docs/polars_selector_string.md @@ -2,7 +2,7 @@ title: polars selector string categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all string columns. Use `--include-categorical` to also select categorical columns. usage: | diff --git a/commands/docs/polars_selector_struct.md b/commands/docs/polars_selector_struct.md index adddf77e305..288c3df111e 100644 --- a/commands/docs/polars_selector_struct.md +++ b/commands/docs/polars_selector_struct.md @@ -2,7 +2,7 @@ title: polars selector struct categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all struct columns. usage: | diff --git a/commands/docs/polars_selector_temporal.md b/commands/docs/polars_selector_temporal.md index b028b158f22..1f93b3a2580 100644 --- a/commands/docs/polars_selector_temporal.md +++ b/commands/docs/polars_selector_temporal.md @@ -2,7 +2,7 @@ title: polars selector temporal categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all temporal columns (date, datetime, duration, and time). usage: | diff --git a/commands/docs/polars_selector_unsigned-integer.md b/commands/docs/polars_selector_unsigned-integer.md index 1f4e0d6808a..71cf8aeb4dc 100644 --- a/commands/docs/polars_selector_unsigned-integer.md +++ b/commands/docs/polars_selector_unsigned-integer.md @@ -2,7 +2,7 @@ title: polars selector unsigned-integer categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Select all unsigned integer columns. usage: | diff --git a/commands/docs/polars_set-with-idx.md b/commands/docs/polars_set-with-idx.md index eee961d15bd..f029d2155ff 100644 --- a/commands/docs/polars_set-with-idx.md +++ b/commands/docs/polars_set-with-idx.md @@ -2,7 +2,7 @@ title: polars set-with-idx categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Sets value in the given index. usage: | diff --git a/commands/docs/polars_set.md b/commands/docs/polars_set.md index 5f40b9a82a5..0612340076c 100644 --- a/commands/docs/polars_set.md +++ b/commands/docs/polars_set.md @@ -2,7 +2,7 @@ title: polars set categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Sets value where given mask is true. usage: | diff --git a/commands/docs/polars_shape.md b/commands/docs/polars_shape.md index 5672ede8c8b..796f93368a3 100644 --- a/commands/docs/polars_shape.md +++ b/commands/docs/polars_shape.md @@ -2,7 +2,7 @@ title: polars shape categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Shows column and row size for a dataframe. usage: | diff --git a/commands/docs/polars_shift.md b/commands/docs/polars_shift.md index 4c37f7ace20..ed61e3146f7 100644 --- a/commands/docs/polars_shift.md +++ b/commands/docs/polars_shift.md @@ -2,7 +2,7 @@ title: polars shift categories: | dataframe or lazyframe -version: 0.113.0 +version: 0.114.0 dataframe_or_lazyframe: | Shifts the values by a given period. usage: | @@ -36,6 +36,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Shifts the values by a given period diff --git a/commands/docs/polars_slice.md b/commands/docs/polars_slice.md index 8b2d29920c9..47b2a8c1454 100644 --- a/commands/docs/polars_slice.md +++ b/commands/docs/polars_slice.md @@ -2,7 +2,7 @@ title: polars slice categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates new dataframe from a slice of rows. usage: | diff --git a/commands/docs/polars_sort-by.md b/commands/docs/polars_sort-by.md index 8a30272a9c6..71edc13d6e7 100644 --- a/commands/docs/polars_sort-by.md +++ b/commands/docs/polars_sort-by.md @@ -2,7 +2,7 @@ title: polars sort-by categories: | lazyframe -version: 0.113.0 +version: 0.114.0 lazyframe: | Sorts a lazy dataframe based on expression(s). usage: | diff --git a/commands/docs/polars_std.md b/commands/docs/polars_std.md index 2be9d18208c..aa8eb1887ed 100644 --- a/commands/docs/polars_std.md +++ b/commands/docs/polars_std.md @@ -2,7 +2,7 @@ title: polars std categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a std expression for an aggregation of std value from columns in a dataframe. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_store-get.md b/commands/docs/polars_store-get.md index c384dfb3d70..7c05b3c4597 100644 --- a/commands/docs/polars_store-get.md +++ b/commands/docs/polars_store-get.md @@ -2,7 +2,7 @@ title: polars store-get categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Gets a Dataframe or other object from the plugin cache. usage: | diff --git a/commands/docs/polars_store-ls.md b/commands/docs/polars_store-ls.md index 99aac236a71..51c7f820669 100644 --- a/commands/docs/polars_store-ls.md +++ b/commands/docs/polars_store-ls.md @@ -2,7 +2,7 @@ title: polars store-ls categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Lists stored polars objects. usage: | diff --git a/commands/docs/polars_store-rm.md b/commands/docs/polars_store-rm.md index 433574c0aff..2c89881f669 100644 --- a/commands/docs/polars_store-rm.md +++ b/commands/docs/polars_store-rm.md @@ -2,7 +2,7 @@ title: polars store-rm categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Removes a stored Dataframe or other object from the plugin cache. usage: | diff --git a/commands/docs/polars_str-join.md b/commands/docs/polars_str-join.md index a4353f0cc83..4e0cda934db 100644 --- a/commands/docs/polars_str-join.md +++ b/commands/docs/polars_str-join.md @@ -2,7 +2,7 @@ title: polars str-join categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Concatenates strings within a column or dataframes usage: | @@ -35,6 +35,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_str-lengths.md b/commands/docs/polars_str-lengths.md index ebff8ae9470..e163d167e3d 100644 --- a/commands/docs/polars_str-lengths.md +++ b/commands/docs/polars_str-lengths.md @@ -2,7 +2,7 @@ title: polars str-lengths categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Get lengths of all strings. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_str-replace-all.md b/commands/docs/polars_str-replace-all.md index c83a552470c..eaeeffc23f3 100644 --- a/commands/docs/polars_str-replace-all.md +++ b/commands/docs/polars_str-replace-all.md @@ -2,7 +2,7 @@ title: polars str-replace-all categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Replace all (sub)strings by a regex pattern. usage: | @@ -33,6 +33,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Replaces string in a column diff --git a/commands/docs/polars_str-replace.md b/commands/docs/polars_str-replace.md index 20ad77605f0..24a45ed62a1 100644 --- a/commands/docs/polars_str-replace.md +++ b/commands/docs/polars_str-replace.md @@ -2,7 +2,7 @@ title: polars str-replace categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Replace the leftmost (sub)string by a regex pattern. usage: | @@ -33,6 +33,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Replaces string in column diff --git a/commands/docs/polars_str-slice.md b/commands/docs/polars_str-slice.md index 6eb564bb5ff..92f7f07384e 100644 --- a/commands/docs/polars_str-slice.md +++ b/commands/docs/polars_str-slice.md @@ -2,7 +2,7 @@ title: polars str-slice categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Slices the string from the start position until the selected length. usage: | @@ -34,6 +34,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_str-split.md b/commands/docs/polars_str-split.md index 16441cd9872..d9d8300d2f2 100644 --- a/commands/docs/polars_str-split.md +++ b/commands/docs/polars_str-split.md @@ -2,7 +2,7 @@ title: polars str-split categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Split the string by a substring. The resulting dtype is list. usage: | diff --git a/commands/docs/polars_str-strip-chars.md b/commands/docs/polars_str-strip-chars.md index c3a4af3178c..848a4a09751 100644 --- a/commands/docs/polars_str-strip-chars.md +++ b/commands/docs/polars_str-strip-chars.md @@ -2,7 +2,7 @@ title: polars str-strip-chars categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Strips specified characters from strings in a column usage: | diff --git a/commands/docs/polars_strftime.md b/commands/docs/polars_strftime.md index f47dc01ab42..b5b81cc8b41 100644 --- a/commands/docs/polars_strftime.md +++ b/commands/docs/polars_strftime.md @@ -2,7 +2,7 @@ title: polars strftime categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Formats date based on string rule. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_struct-json-encode.md b/commands/docs/polars_struct-json-encode.md index cdf17e0c327..e2834ea346c 100644 --- a/commands/docs/polars_struct-json-encode.md +++ b/commands/docs/polars_struct-json-encode.md @@ -2,7 +2,7 @@ title: polars struct-json-encode categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Convert this struct to a string column with json values. usage: | diff --git a/commands/docs/polars_sum.md b/commands/docs/polars_sum.md index 90b57cc5e07..987ac01e05b 100644 --- a/commands/docs/polars_sum.md +++ b/commands/docs/polars_sum.md @@ -2,7 +2,7 @@ title: polars sum categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates a sum expression for an aggregation or aggregates columns to their sum value. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_summary.md b/commands/docs/polars_summary.md index 23d35d19a03..a19ccd80881 100644 --- a/commands/docs/polars_summary.md +++ b/commands/docs/polars_summary.md @@ -2,7 +2,7 @@ title: polars summary categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. usage: | diff --git a/commands/docs/polars_take.md b/commands/docs/polars_take.md index 1406702fb81..e4c998b192e 100644 --- a/commands/docs/polars_take.md +++ b/commands/docs/polars_take.md @@ -2,7 +2,7 @@ title: polars take categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Creates new dataframe using the given indices. usage: | diff --git a/commands/docs/polars_truncate.md b/commands/docs/polars_truncate.md index a3550d058aa..7feaa9a9664 100644 --- a/commands/docs/polars_truncate.md +++ b/commands/docs/polars_truncate.md @@ -2,7 +2,7 @@ title: polars truncate categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Divide the date/datetime range into buckets. usage: | @@ -36,14 +36,14 @@ contributors: false Truncate a series of dates by period length ```nu > seq date -b 2025-01-01 --periods 4 --increment 6wk -o "%Y-%m-%d %H:%M:%S" | polars into-df | polars as-datetime "%F %H:%M:%S" --naive | polars select datetime (polars col datetime | polars truncate 5d37m | polars as truncated) -╭───┬────────────┬────────────╮ -│ # │ datetime │ truncated │ -├───┼────────────┼────────────┤ -│ 0 │ a year ago │ a year ago │ -│ 1 │ a year ago │ a year ago │ -│ 2 │ a year ago │ a year ago │ -│ 3 │ a year ago │ a year ago │ -╰───┴────────────┴────────────╯ +╭───┬─────────────┬─────────────╮ +│ # │ datetime │ truncated │ +├───┼─────────────┼─────────────┤ +│ 0 │ 2 years ago │ 2 years ago │ +│ 1 │ a year ago │ a year ago │ +│ 2 │ a year ago │ a year ago │ +│ 3 │ a year ago │ a year ago │ +╰───┴─────────────┴─────────────╯ ``` diff --git a/commands/docs/polars_unique.md b/commands/docs/polars_unique.md index 02cb2cb4f18..ffb8673c07c 100644 --- a/commands/docs/polars_unique.md +++ b/commands/docs/polars_unique.md @@ -2,7 +2,7 @@ title: polars unique categories: | dataframe or lazyframe -version: 0.113.0 +version: 0.114.0 dataframe_or_lazyframe: | Returns unique values from a dataframe. usage: | @@ -34,6 +34,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Returns unique values from a series diff --git a/commands/docs/polars_unnest.md b/commands/docs/polars_unnest.md index 144a1f671b7..1669b702279 100644 --- a/commands/docs/polars_unnest.md +++ b/commands/docs/polars_unnest.md @@ -2,7 +2,7 @@ title: polars unnest categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Decompose struct columns into separate columns for each of their fields. The new columns will be inserted into the dataframe at the location of the struct column. usage: | diff --git a/commands/docs/polars_unpivot.md b/commands/docs/polars_unpivot.md index 93ccf5433a3..26aef372ada 100644 --- a/commands/docs/polars_unpivot.md +++ b/commands/docs/polars_unpivot.md @@ -2,7 +2,7 @@ title: polars unpivot categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Unpivot a DataFrame from wide to long format. usage: | diff --git a/commands/docs/polars_uppercase.md b/commands/docs/polars_uppercase.md index 40fdfe6e76c..06e233916e4 100644 --- a/commands/docs/polars_uppercase.md +++ b/commands/docs/polars_uppercase.md @@ -2,7 +2,7 @@ title: polars uppercase categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Uppercase the strings in the column. usage: | @@ -28,6 +28,7 @@ contributors: false | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | | polars_expression | polars_expression | +| polars_selector | polars_expression | ## Examples Modifies strings in a column to uppercase diff --git a/commands/docs/polars_value-counts.md b/commands/docs/polars_value-counts.md index 425f93b7322..49b6901de64 100644 --- a/commands/docs/polars_value-counts.md +++ b/commands/docs/polars_value-counts.md @@ -2,7 +2,7 @@ title: polars value-counts categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Returns a dataframe with the counts for unique values in series. usage: | diff --git a/commands/docs/polars_var.md b/commands/docs/polars_var.md index c0685cd35ea..9733bb80c09 100644 --- a/commands/docs/polars_var.md +++ b/commands/docs/polars_var.md @@ -2,7 +2,7 @@ title: polars var categories: | dataframe -version: 0.113.0 +version: 0.114.0 dataframe: | Create a var expression for an aggregation. usage: | @@ -26,6 +26,7 @@ contributors: false | input | output | | ----------------- | ----------------- | | polars_expression | polars_expression | +| polars_selector | polars_expression | | polars_dataframe | polars_dataframe | | polars_lazyframe | polars_lazyframe | ## Examples diff --git a/commands/docs/polars_when.md b/commands/docs/polars_when.md index 13e30ad7a3d..9bf0bae715b 100644 --- a/commands/docs/polars_when.md +++ b/commands/docs/polars_when.md @@ -2,7 +2,7 @@ title: polars when categories: | expression -version: 0.113.0 +version: 0.114.0 expression: | Creates and modifies a when expression. usage: | @@ -32,7 +32,7 @@ contributors: false | ----------------- | ----------------- | | nothing | polars_expression | | polars_expression | polars_expression | -| any | polars_expression | +| polars_selector | polars_expression | ## Examples Create a when conditions diff --git a/commands/docs/polars_with-column.md b/commands/docs/polars_with-column.md index fe4f2f6c352..b918af14dba 100644 --- a/commands/docs/polars_with-column.md +++ b/commands/docs/polars_with-column.md @@ -2,7 +2,7 @@ title: polars with-column categories: | dataframe or lazyframe -version: 0.113.0 +version: 0.114.0 dataframe_or_lazyframe: | Adds a series to the dataframe. usage: | diff --git a/commands/docs/port.md b/commands/docs/port.md index 706b50acc9b..fc55771e0c2 100644 --- a/commands/docs/port.md +++ b/commands/docs/port.md @@ -2,7 +2,7 @@ title: port categories: | network -version: 0.113.0 +version: 0.114.0 network: | Get a free TCP port from system. usage: | diff --git a/commands/docs/prepend.md b/commands/docs/prepend.md index fb7d1dad867..5d7425219cc 100644 --- a/commands/docs/prepend.md +++ b/commands/docs/prepend.md @@ -2,7 +2,7 @@ title: prepend categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Prepend any number of rows to a table. usage: | diff --git a/commands/docs/print.md b/commands/docs/print.md index 839f4bc0d30..ced5687ff60 100644 --- a/commands/docs/print.md +++ b/commands/docs/print.md @@ -2,7 +2,7 @@ title: print categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Print the given values to stdout. usage: | diff --git a/commands/docs/ps.md b/commands/docs/ps.md index f1c10c48b3f..a8453e9e963 100644 --- a/commands/docs/ps.md +++ b/commands/docs/ps.md @@ -2,7 +2,7 @@ title: ps categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about system processes. usage: | diff --git a/commands/docs/pwd.md b/commands/docs/pwd.md index 5118d6d244e..e64af378996 100644 --- a/commands/docs/pwd.md +++ b/commands/docs/pwd.md @@ -2,7 +2,7 @@ title: pwd categories: | default -version: 0.113.0 +version: 0.114.0 default: | Return the current working directory usage: | diff --git a/commands/docs/query.md b/commands/docs/query.md index 58ae4bf0924..341cd547ee7 100644 --- a/commands/docs/query.md +++ b/commands/docs/query.md @@ -2,7 +2,7 @@ title: query categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Show all the query commands usage: | diff --git a/commands/docs/query_db.md b/commands/docs/query_db.md index d1b2da83688..8cdb79ee476 100644 --- a/commands/docs/query_db.md +++ b/commands/docs/query_db.md @@ -2,7 +2,7 @@ title: query db categories: | database -version: 0.113.0 +version: 0.114.0 database: | Query a SQLite database with SQL statements. usage: | diff --git a/commands/docs/query_json.md b/commands/docs/query_json.md index 79947358a8b..04bf0409563 100644 --- a/commands/docs/query_json.md +++ b/commands/docs/query_json.md @@ -2,7 +2,7 @@ title: query json categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | execute json query on json file (open --raw | query json 'query string') usage: | diff --git a/commands/docs/query_web.md b/commands/docs/query_web.md index ed9380a5298..edd0b317cc0 100644 --- a/commands/docs/query_web.md +++ b/commands/docs/query_web.md @@ -2,7 +2,7 @@ title: query web categories: | network -version: 0.113.0 +version: 0.114.0 network: | execute selector query on html/web usage: | diff --git a/commands/docs/query_webpage-info.md b/commands/docs/query_webpage-info.md index c6af48a51d1..494747da0b8 100644 --- a/commands/docs/query_webpage-info.md +++ b/commands/docs/query_webpage-info.md @@ -2,7 +2,7 @@ title: query webpage-info categories: | network -version: 0.113.0 +version: 0.114.0 network: | uses the webpage crate to extract info from html: title, description, language, links, RSS feeds, Opengraph, Schema.org, and more usage: | diff --git a/commands/docs/query_xml.md b/commands/docs/query_xml.md index ccf5d623929..700d565725e 100644 --- a/commands/docs/query_xml.md +++ b/commands/docs/query_xml.md @@ -2,7 +2,7 @@ title: query xml categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Execute XPath 1.0 query on XML input usage: | diff --git a/commands/docs/random.md b/commands/docs/random.md index 6376ef482e3..eb63c53e337 100644 --- a/commands/docs/random.md +++ b/commands/docs/random.md @@ -2,7 +2,7 @@ title: random categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate a random value. usage: | @@ -38,4 +38,5 @@ You must use one of the following subcommands. Using this command as-is will onl | [`random chars`](/commands/docs/random_chars.md) | Generate random chars uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9. | built-in | | [`random float`](/commands/docs/random_float.md) | Generate a random float within a range [min..max]. | built-in | | [`random int`](/commands/docs/random_int.md) | Generate a random integer [min..max]. | built-in | +| [`random pass`](/commands/docs/random_pass.md) | Generate a cryptologically secure password. | built-in | | [`random uuid`](/commands/docs/random_uuid.md) | Generate a random uuid string of the specified version. | built-in | \ No newline at end of file diff --git a/commands/docs/random_binary.md b/commands/docs/random_binary.md index 4ea440ac2fc..373d30c25e9 100644 --- a/commands/docs/random_binary.md +++ b/commands/docs/random_binary.md @@ -2,7 +2,7 @@ title: random binary categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate random bytes. usage: | diff --git a/commands/docs/random_bool.md b/commands/docs/random_bool.md index cfccad2630d..4ab50a4eaf0 100644 --- a/commands/docs/random_bool.md +++ b/commands/docs/random_bool.md @@ -2,7 +2,7 @@ title: random bool categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate a random boolean value. usage: | diff --git a/commands/docs/random_chars.md b/commands/docs/random_chars.md index 6bc8356933e..f35c14ba234 100644 --- a/commands/docs/random_chars.md +++ b/commands/docs/random_chars.md @@ -2,7 +2,7 @@ title: random chars categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate random chars uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9. usage: | diff --git a/commands/docs/random_float.md b/commands/docs/random_float.md index f7eccdefdf9..072589f2d69 100644 --- a/commands/docs/random_float.md +++ b/commands/docs/random_float.md @@ -2,7 +2,7 @@ title: random float categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate a random float within a range [min..max]. usage: | diff --git a/commands/docs/random_int.md b/commands/docs/random_int.md index e3edb9b18db..7a71f15a033 100644 --- a/commands/docs/random_int.md +++ b/commands/docs/random_int.md @@ -2,7 +2,7 @@ title: random int categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate a random integer [min..max]. usage: | diff --git a/commands/docs/random_pass.md b/commands/docs/random_pass.md new file mode 100644 index 00000000000..b2f2f2b6ce2 --- /dev/null +++ b/commands/docs/random_pass.md @@ -0,0 +1,70 @@ +--- +title: random pass +categories: | + random +version: 0.114.0 +random: | + Generate a cryptologically secure password. +usage: | + Generate a cryptologically secure password. +editLink: false +contributors: false +--- + + +# `random pass` for [random](/commands/categories/random.md) + +
Generate a cryptologically secure password.
+ +## Signature + +```> random pass {flags} ``` + +## Flags + + - `--chars, -c {int}`: Length of the generated password (default 12). + - `--no-uppercase, -u`: Exclude uppercase letters A-Z. + - `--no-lowercase, -l`: Exclude lowercase letters a-z. + - `--no-numbers, -n`: Exclude numbers 0-9. + - `--no-symbols, -s`: Exclude symbols like !@#$%. + - `--include-ambiguous`: Include ambiguous characters O, 0, l, 1. + - `--include-similar`: Include similar characters i, l, 1. + - `--require-each-type`: Guarantee at least one char from each enabled character type. + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | string | +## Examples + +Generate a 12-character password with defaults +```nu +> random pass + +``` + +Generate a 20-character password +```nu +> random pass --chars 20 + +``` + +Generate a password without symbols +```nu +> random pass --no-symbols + +``` + +Generate a password with only uppercase letters and numbers +```nu +> random pass --no-lowercase --no-symbols + +``` + +Generate a password including ambiguous characters and requiring each type +```nu +> random pass --include-ambiguous --require-each-type + +``` diff --git a/commands/docs/random_uuid.md b/commands/docs/random_uuid.md index 7d9511eef33..2a98d454dfa 100644 --- a/commands/docs/random_uuid.md +++ b/commands/docs/random_uuid.md @@ -2,7 +2,7 @@ title: random uuid categories: | random -version: 0.113.0 +version: 0.114.0 random: | Generate a random uuid string of the specified version. usage: | diff --git a/commands/docs/reduce.md b/commands/docs/reduce.md index 7bf8266c054..b76b2939964 100644 --- a/commands/docs/reduce.md +++ b/commands/docs/reduce.md @@ -2,7 +2,7 @@ title: reduce categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Aggregate a list (starting from the left) to a single value using an accumulator closure. usage: | diff --git a/commands/docs/registry.md b/commands/docs/registry.md index b9cde37888b..3c276e8bd53 100644 --- a/commands/docs/registry.md +++ b/commands/docs/registry.md @@ -2,7 +2,7 @@ title: registry categories: | system -version: 0.113.0 +version: 0.114.0 system: | Various commands for interacting with the system registry (Windows only). usage: | diff --git a/commands/docs/registry_query.md b/commands/docs/registry_query.md index 360cd27cfde..a0c006703fd 100644 --- a/commands/docs/registry_query.md +++ b/commands/docs/registry_query.md @@ -2,7 +2,7 @@ title: registry query categories: | system -version: 0.113.0 +version: 0.114.0 system: | Query the Windows registry. usage: | diff --git a/commands/docs/reject.md b/commands/docs/reject.md index 75e110ad8c6..6867eb2807a 100644 --- a/commands/docs/reject.md +++ b/commands/docs/reject.md @@ -2,7 +2,7 @@ title: reject categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Remove the given columns or rows from the table. Opposite of `select`. usage: | diff --git a/commands/docs/rename.md b/commands/docs/rename.md index 9945995af50..6f572093942 100644 --- a/commands/docs/rename.md +++ b/commands/docs/rename.md @@ -2,7 +2,7 @@ title: rename categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Creates a new table with columns renamed. usage: | diff --git a/commands/docs/return.md b/commands/docs/return.md index 660c0c413c9..a1dec1b6be0 100644 --- a/commands/docs/return.md +++ b/commands/docs/return.md @@ -2,7 +2,7 @@ title: return categories: | core -version: 0.113.0 +version: 0.114.0 core: | Return early from a custom command. usage: | diff --git a/commands/docs/reverse.md b/commands/docs/reverse.md index a301e74aa34..c9034c86817 100644 --- a/commands/docs/reverse.md +++ b/commands/docs/reverse.md @@ -2,7 +2,7 @@ title: reverse categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Reverses the input list or table. usage: | diff --git a/commands/docs/rm.md b/commands/docs/rm.md index 63b87c54707..5e672ee8af7 100644 --- a/commands/docs/rm.md +++ b/commands/docs/rm.md @@ -2,7 +2,7 @@ title: rm categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Remove files and directories. usage: | diff --git a/commands/docs/roll.md b/commands/docs/roll.md index 2335c2bb154..9f88bd5b7bd 100644 --- a/commands/docs/roll.md +++ b/commands/docs/roll.md @@ -2,7 +2,7 @@ title: roll categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Rolling commands for tables. usage: | diff --git a/commands/docs/roll_down.md b/commands/docs/roll_down.md index 9814e897d43..da6320a733a 100644 --- a/commands/docs/roll_down.md +++ b/commands/docs/roll_down.md @@ -2,7 +2,7 @@ title: roll down categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Roll table rows down. usage: | diff --git a/commands/docs/roll_left.md b/commands/docs/roll_left.md index a10f61e902d..5913e895660 100644 --- a/commands/docs/roll_left.md +++ b/commands/docs/roll_left.md @@ -2,7 +2,7 @@ title: roll left categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Roll record or table columns left. usage: | diff --git a/commands/docs/roll_right.md b/commands/docs/roll_right.md index db61cb4e844..d22c20a93dc 100644 --- a/commands/docs/roll_right.md +++ b/commands/docs/roll_right.md @@ -2,7 +2,7 @@ title: roll right categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Roll table columns right. usage: | diff --git a/commands/docs/roll_up.md b/commands/docs/roll_up.md index b0bd824ed8f..c66419786e7 100644 --- a/commands/docs/roll_up.md +++ b/commands/docs/roll_up.md @@ -2,7 +2,7 @@ title: roll up categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Roll table rows up. usage: | diff --git a/commands/docs/rotate.md b/commands/docs/rotate.md index e45d884ae4d..7d47c817803 100644 --- a/commands/docs/rotate.md +++ b/commands/docs/rotate.md @@ -2,7 +2,7 @@ title: rotate categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag). usage: | diff --git a/commands/docs/run-external.md b/commands/docs/run-external.md index 29cbcb57c53..4c5fa2d63c5 100644 --- a/commands/docs/run-external.md +++ b/commands/docs/run-external.md @@ -2,7 +2,7 @@ title: run-external categories: | system -version: 0.113.0 +version: 0.114.0 system: | Runs external command. usage: | diff --git a/commands/docs/run-internal.md b/commands/docs/run-internal.md index 59cd36e0f04..5f746632bd4 100644 --- a/commands/docs/run-internal.md +++ b/commands/docs/run-internal.md @@ -2,7 +2,7 @@ title: run-internal categories: | default -version: 0.113.0 +version: 0.114.0 default: | Run a built-in command by name. Used internally by `%($cmd)` dynamic dispatch. usage: | diff --git a/commands/docs/run.md b/commands/docs/run.md new file mode 100644 index 00000000000..23d18757004 --- /dev/null +++ b/commands/docs/run.md @@ -0,0 +1,66 @@ +--- +title: run +categories: | + core +version: 0.114.0 +core: | + Runs a script file in an isolated scope as part of a pipeline. +usage: | + Runs a script file in an isolated scope as part of a pipeline. +editLink: false +contributors: false +--- + + +# `run` for [core](/commands/categories/core.md) + +
Runs a script file in an isolated scope as part of a pipeline.
+ +## Signature + +```> run {flags} (filename) ...rest``` + +## Flags + + - `--full-reparse, -f`: Reload and reparse the script on every invocation instead of using parser-cached blocks. + +## Parameters + + - `filename`: The filepath to the script file to run (`null` for no-op). + - `...rest`: Arguments to pass to the script's `def main` if it exists. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Run a simple transformation script in a pipeline. +```nu +> "hello" | run transform.nu + +``` + +Run a script with arguments. +```nu +> "test" | run format.nu --prefix ">>>" + +``` + +Run a script as part of a larger pipeline. +```nu +> ls | run process.nu | select name size + +``` + +Always reload and reparse a script before each invocation. +```nu +> watch . -g *.nu | each -f { run --full-reparse ./test.nu } + +``` + +## Notes +This command is a parser keyword. For details, check: + https://www.nushell.sh/book/thinking_in_nu.html \ No newline at end of file diff --git a/commands/docs/save.md b/commands/docs/save.md index dc313e49030..31b44d437cd 100644 --- a/commands/docs/save.md +++ b/commands/docs/save.md @@ -2,7 +2,7 @@ title: save categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Save a file. usage: | diff --git a/commands/docs/schema.md b/commands/docs/schema.md index 6344e53ad76..c4fb5fb30de 100644 --- a/commands/docs/schema.md +++ b/commands/docs/schema.md @@ -2,7 +2,7 @@ title: schema categories: | database -version: 0.113.0 +version: 0.114.0 database: | Show the schema of a SQLite database. usage: | diff --git a/commands/docs/scope.md b/commands/docs/scope.md index c6b4bafa710..5423eaf4754 100644 --- a/commands/docs/scope.md +++ b/commands/docs/scope.md @@ -2,7 +2,7 @@ title: scope categories: | core -version: 0.113.0 +version: 0.114.0 core: | Commands for getting info about what is in scope. usage: | diff --git a/commands/docs/scope_aliases.md b/commands/docs/scope_aliases.md index 6e6deed7ba0..b6f6fd73b96 100644 --- a/commands/docs/scope_aliases.md +++ b/commands/docs/scope_aliases.md @@ -2,7 +2,7 @@ title: scope aliases categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output info on the aliases in the current scope. usage: | diff --git a/commands/docs/scope_commands.md b/commands/docs/scope_commands.md index 4a9917f49ba..b0d4e05ee72 100644 --- a/commands/docs/scope_commands.md +++ b/commands/docs/scope_commands.md @@ -2,7 +2,7 @@ title: scope commands categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output info on the commands in the current scope. usage: | diff --git a/commands/docs/scope_engine-stats.md b/commands/docs/scope_engine-stats.md index f2b51cefa57..5592ba46b3e 100644 --- a/commands/docs/scope_engine-stats.md +++ b/commands/docs/scope_engine-stats.md @@ -2,7 +2,7 @@ title: scope engine-stats categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output stats on the engine in the current state. usage: | diff --git a/commands/docs/scope_externs.md b/commands/docs/scope_externs.md index 9e0ab753434..7844a887a0f 100644 --- a/commands/docs/scope_externs.md +++ b/commands/docs/scope_externs.md @@ -2,7 +2,7 @@ title: scope externs categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output info on the known externals in the current scope. usage: | diff --git a/commands/docs/scope_modules.md b/commands/docs/scope_modules.md index d1e2d747a16..3067d22bf66 100644 --- a/commands/docs/scope_modules.md +++ b/commands/docs/scope_modules.md @@ -2,7 +2,7 @@ title: scope modules categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output info on the modules in the current scope. usage: | diff --git a/commands/docs/scope_variables.md b/commands/docs/scope_variables.md index 90aef62c5d4..9585bc6c324 100644 --- a/commands/docs/scope_variables.md +++ b/commands/docs/scope_variables.md @@ -2,7 +2,7 @@ title: scope variables categories: | core -version: 0.113.0 +version: 0.114.0 core: | Output info on the variables in the current scope. usage: | diff --git a/commands/docs/select.md b/commands/docs/select.md index 87216fe3040..4c0961cae3e 100644 --- a/commands/docs/select.md +++ b/commands/docs/select.md @@ -2,7 +2,7 @@ title: select categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Select only these columns or rows from the input. Opposite of `reject`. usage: | diff --git a/commands/docs/semver.md b/commands/docs/semver.md new file mode 100644 index 00000000000..4d389f55c6c --- /dev/null +++ b/commands/docs/semver.md @@ -0,0 +1,36 @@ +--- +title: semver +categories: | + filters +version: 0.114.0 +filters: | + Various commands for working with semantic versions. +usage: | + Various commands for working with semantic versions. +editLink: false +contributors: false +--- + + +# `semver` for [filters](/commands/categories/filters.md) + +
Various commands for working with semantic versions.
+ +## Signature + +```> semver {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | string | +## Notes +You must use one of the following subcommands. Using this command as-is will only produce this help message. + +## Subcommands: + +| name | description | type | +| ---------------------------------------------- | ------------------------------------------ | -------- | +| [`semver bump`](/commands/docs/semver_bump.md) | Bump a semantic version to the next level. | built-in | \ No newline at end of file diff --git a/commands/docs/semver_bump.md b/commands/docs/semver_bump.md new file mode 100644 index 00000000000..f94ceb4dc94 --- /dev/null +++ b/commands/docs/semver_bump.md @@ -0,0 +1,82 @@ +--- +title: semver bump +categories: | + filters +version: 0.114.0 +filters: | + Bump a semantic version to the next level. +usage: | + Bump a semantic version to the next level. +editLink: false +contributors: false +--- + + +# `semver bump` for [filters](/commands/categories/filters.md) + +
Bump a semantic version to the next level.
+ +## Signature + +```> semver bump {flags} (level)``` + +## Flags + + - `--ignore-errors, -i`: If the input is not a valid semver version, return the original input unchanged + - `--preserve-build-metadata, -p`: Preserve the existing build metadata from the input version + - `--build-metadata, -b {string}`: Additionally set the build metadata. Takes precedence over --preserve-build-metadata + +## Parameters + + - `level`: The level to bump: major, minor, patch, alpha, beta, rc, release. + + +## Input/output types: + +| input | output | +| ------ | ------ | +| semver | semver | +| string | semver | +## Examples + +Bump major version +```nu +> '1.2.3' | into semver | semver bump major +2.0.0 +``` + +Bump minor version +```nu +> '1.2.3' | into semver | semver bump minor +1.3.0 +``` + +Bump patch version +```nu +> '1.2.3' | into semver | semver bump patch +1.2.4 +``` + +Bump patch version with string input +```nu +> '1.2.3' | semver bump patch +1.2.4 +``` + +Add alpha prerelease +```nu +> '1.2.3' | into semver | semver bump alpha +1.2.3-alpha.1 +``` + +Remove prerelease +```nu +> '1.2.3-alpha' | into semver | semver bump release +1.2.3 +``` + +Bump with preserved build metadata +```nu +> '1.2.3+build.5' | into semver | semver bump patch --preserve-build-metadata +1.2.4+build.5 +``` diff --git a/commands/docs/seq.md b/commands/docs/seq.md index 3262d6410ca..e5297a663af 100644 --- a/commands/docs/seq.md +++ b/commands/docs/seq.md @@ -2,7 +2,7 @@ title: seq categories: | generators -version: 0.113.0 +version: 0.114.0 generators: | Output sequences of numbers. usage: | diff --git a/commands/docs/seq_char.md b/commands/docs/seq_char.md index 6ef0f4b6a11..1949da3af84 100644 --- a/commands/docs/seq_char.md +++ b/commands/docs/seq_char.md @@ -2,7 +2,7 @@ title: seq char categories: | generators -version: 0.113.0 +version: 0.114.0 generators: | Print a sequence of ASCII characters. usage: | diff --git a/commands/docs/seq_date.md b/commands/docs/seq_date.md index 133747235d0..764d40d30a0 100644 --- a/commands/docs/seq_date.md +++ b/commands/docs/seq_date.md @@ -2,7 +2,7 @@ title: seq date categories: | generators -version: 0.113.0 +version: 0.114.0 generators: | Print sequences of dates. usage: | diff --git a/commands/docs/shuffle.md b/commands/docs/shuffle.md index 5bcdb03c4c4..d3d153e007c 100644 --- a/commands/docs/shuffle.md +++ b/commands/docs/shuffle.md @@ -2,7 +2,7 @@ title: shuffle categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Shuffle rows randomly. usage: | diff --git a/commands/docs/skip.md b/commands/docs/skip.md index 0c62f7d6436..de998aad3ef 100644 --- a/commands/docs/skip.md +++ b/commands/docs/skip.md @@ -2,7 +2,7 @@ title: skip categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Skip the first several rows of the input. Counterpart of `drop`. Opposite of `first`. usage: | diff --git a/commands/docs/skip_until.md b/commands/docs/skip_until.md index 91e562c35bc..f3b0bcb4886 100644 --- a/commands/docs/skip_until.md +++ b/commands/docs/skip_until.md @@ -2,7 +2,7 @@ title: skip until categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Skip elements of the input until a predicate is true. usage: | diff --git a/commands/docs/skip_while.md b/commands/docs/skip_while.md index 85e820887c7..4aee42baeb0 100644 --- a/commands/docs/skip_while.md +++ b/commands/docs/skip_while.md @@ -2,7 +2,7 @@ title: skip while categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Skip elements of the input while a predicate is true. usage: | diff --git a/commands/docs/sleep.md b/commands/docs/sleep.md index bc15718feb6..48900562015 100644 --- a/commands/docs/sleep.md +++ b/commands/docs/sleep.md @@ -2,7 +2,7 @@ title: sleep categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Delay for a specified amount of time. usage: | diff --git a/commands/docs/slice.md b/commands/docs/slice.md index 9d05f1da6d0..520f3c50f69 100644 --- a/commands/docs/slice.md +++ b/commands/docs/slice.md @@ -2,7 +2,7 @@ title: slice categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Return only the selected rows. usage: | diff --git a/commands/docs/sort-by.md b/commands/docs/sort-by.md index 3caf037bc4f..e5bb2e6b1c5 100644 --- a/commands/docs/sort-by.md +++ b/commands/docs/sort-by.md @@ -2,7 +2,7 @@ title: sort-by categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Sort by the given cell path or closure. usage: | diff --git a/commands/docs/sort.md b/commands/docs/sort.md index 66bd982672c..693caa0b301 100644 --- a/commands/docs/sort.md +++ b/commands/docs/sort.md @@ -2,7 +2,7 @@ title: sort categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Sort the input in increasing order. usage: | diff --git a/commands/docs/source-env.md b/commands/docs/source-env.md index bb31259b46f..17fa7f57321 100644 --- a/commands/docs/source-env.md +++ b/commands/docs/source-env.md @@ -2,7 +2,7 @@ title: source-env categories: | core -version: 0.113.0 +version: 0.114.0 core: | Source the environment from a source file into the current environment. usage: | diff --git a/commands/docs/source.md b/commands/docs/source.md index 4ddbe97ed7e..823fc315e11 100644 --- a/commands/docs/source.md +++ b/commands/docs/source.md @@ -2,7 +2,7 @@ title: source categories: | core -version: 0.113.0 +version: 0.114.0 core: | Runs a script file in the current context. usage: | diff --git a/commands/docs/split.md b/commands/docs/split.md index 0b96d9a6df7..ba424a8f97f 100644 --- a/commands/docs/split.md +++ b/commands/docs/split.md @@ -2,7 +2,7 @@ title: split categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Split contents across desired subcommand (like row, column) via the separator. usage: | diff --git a/commands/docs/split_cell-path.md b/commands/docs/split_cell-path.md index b1818ff1c11..c317de04078 100644 --- a/commands/docs/split_cell-path.md +++ b/commands/docs/split_cell-path.md @@ -2,7 +2,7 @@ title: split cell-path categories: | conversions -version: 0.113.0 +version: 0.114.0 conversions: | Split a cell-path into its components. usage: | @@ -23,10 +23,9 @@ contributors: false ## Input/output types: -| input | output | -| --------- | ----------------------------------------------------------- | -| cell-path | list<any> | -| cell-path | list<record<value: any, optional: bool, insensitive: bool>> | +| input | output | +| --------- | ---------------------------------------------------- | +| cell-path | table<value: any, optional: bool, insensitive: bool> | ## Examples Split a cell-path into its components. diff --git a/commands/docs/split_chars.md b/commands/docs/split_chars.md index f9bc0ad63c3..9419af462cf 100644 --- a/commands/docs/split_chars.md +++ b/commands/docs/split_chars.md @@ -2,7 +2,7 @@ title: split chars categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Split a string into a list of characters. usage: | diff --git a/commands/docs/split_column.md b/commands/docs/split_column.md index 323a0c8d40f..5d709d15c0e 100644 --- a/commands/docs/split_column.md +++ b/commands/docs/split_column.md @@ -2,7 +2,7 @@ title: split column categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Split a string into multiple columns using a separator. usage: | @@ -23,7 +23,8 @@ contributors: false ## Flags - `--collapse-empty, -c`: Remove empty columns. - - `--number, -n {int}`: Split into maximum number of items. + - `--number, -n {int}`: Split into maximum number of columns. + - `--right`: When `--number` is used, collect the remainder in the leftmost column. - `--regex, -r`: Separator is a regular expression. ## Parameters @@ -97,3 +98,16 @@ Split into columns, last column may contain the delimiter. ╰───┴────────┴──────────────────────────────────────╯ ``` + +Split into columns, first column may contain the delimiter. +```nu +> ['some-package-1.2.3' 'pkg2-1.0' 'do-smart-things-0.9.1'] | split column --number 2 --right '-' name version +╭───┬─────────────────┬─────────╮ +│ # │ name │ version │ +├───┼─────────────────┼─────────┤ +│ 0 │ some-package │ 1.2.3 │ +│ 1 │ pkg2 │ 1.0 │ +│ 2 │ do-smart-things │ 0.9.1 │ +╰───┴─────────────────┴─────────╯ + +``` diff --git a/commands/docs/split_list.md b/commands/docs/split_list.md index ba4a76541cf..8a21e05fd26 100644 --- a/commands/docs/split_list.md +++ b/commands/docs/split_list.md @@ -2,7 +2,7 @@ title: split list categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Split a list into multiple lists using a separator. usage: | diff --git a/commands/docs/split_row.md b/commands/docs/split_row.md index f3aece3ed1f..6de92d8c89d 100644 --- a/commands/docs/split_row.md +++ b/commands/docs/split_row.md @@ -2,7 +2,7 @@ title: split row categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Split a string into multiple rows using a separator. usage: | @@ -23,6 +23,7 @@ contributors: false ## Flags - `--number, -n {int}`: Split into maximum number of items. + - `--right`: When `--number` is used, collect the remainder in the leftmost item. - `--regex, -r`: Use regex syntax for separator. ## Parameters @@ -85,3 +86,23 @@ Split a string by regex. ╰───┴───╯ ``` + +Split a string a limited number of times. +```nu +> 'a-b-c' | split row --number 2 '-' +╭───┬─────╮ +│ 0 │ a │ +│ 1 │ b-c │ +╰───┴─────╯ + +``` + +Split a string a limited number of times, starting from the right. +```nu +> 'a-b-c' | split row --number 2 --right '-' +╭───┬─────╮ +│ 0 │ a-b │ +│ 1 │ c │ +╰───┴─────╯ + +``` diff --git a/commands/docs/split_words.md b/commands/docs/split_words.md index df3da3897b6..510e1053928 100644 --- a/commands/docs/split_words.md +++ b/commands/docs/split_words.md @@ -2,7 +2,7 @@ title: split words categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Split a string's words into separate rows. usage: | diff --git a/commands/docs/start.md b/commands/docs/start.md index 43179b13b5a..0c292ea8112 100644 --- a/commands/docs/start.md +++ b/commands/docs/start.md @@ -2,7 +2,7 @@ title: start categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Open a folder, file, or website in the default application or viewer. usage: | diff --git a/commands/docs/stor.md b/commands/docs/stor.md index c6c0e06fae3..f008c67797e 100644 --- a/commands/docs/stor.md +++ b/commands/docs/stor.md @@ -2,7 +2,7 @@ title: stor categories: | database -version: 0.113.0 +version: 0.114.0 database: | Various commands for working with the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_create.md b/commands/docs/stor_create.md index fe6cea01e0a..81c47fc4cc2 100644 --- a/commands/docs/stor_create.md +++ b/commands/docs/stor_create.md @@ -2,7 +2,7 @@ title: stor create categories: | database -version: 0.113.0 +version: 0.114.0 database: | Create a table in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_delete.md b/commands/docs/stor_delete.md index 8f8f3ed9cfa..bd5a19a04e6 100644 --- a/commands/docs/stor_delete.md +++ b/commands/docs/stor_delete.md @@ -2,7 +2,7 @@ title: stor delete categories: | database -version: 0.113.0 +version: 0.114.0 database: | Delete a table or specified rows in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_export.md b/commands/docs/stor_export.md index 98a6ec151cc..194955b5d52 100644 --- a/commands/docs/stor_export.md +++ b/commands/docs/stor_export.md @@ -2,7 +2,7 @@ title: stor export categories: | database -version: 0.113.0 +version: 0.114.0 database: | Export the in-memory sqlite database to a sqlite database file. usage: | diff --git a/commands/docs/stor_import.md b/commands/docs/stor_import.md index d7acf4b58cf..b5b7caf283d 100644 --- a/commands/docs/stor_import.md +++ b/commands/docs/stor_import.md @@ -2,7 +2,7 @@ title: stor import categories: | database -version: 0.113.0 +version: 0.114.0 database: | Import a sqlite database file into the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_insert.md b/commands/docs/stor_insert.md index a8dd368d6b7..9584d559e32 100644 --- a/commands/docs/stor_insert.md +++ b/commands/docs/stor_insert.md @@ -2,7 +2,7 @@ title: stor insert categories: | database -version: 0.113.0 +version: 0.114.0 database: | Insert information into a specified table in the in-memory sqlite database. usage: | diff --git a/commands/docs/stor_open.md b/commands/docs/stor_open.md index 7f215d95032..aa5b1cf3795 100644 --- a/commands/docs/stor_open.md +++ b/commands/docs/stor_open.md @@ -2,7 +2,7 @@ title: stor open categories: | database -version: 0.113.0 +version: 0.114.0 database: | Opens the in-memory sqlite database. usage: | @@ -23,9 +23,9 @@ contributors: false ## Input/output types: -| input | output | -| ------- | ---------------- | -| nothing | sqlite-in-memory | +| input | output | +| ------- | -------------- | +| nothing | SQLiteDatabase | ## Examples Open the in-memory sqlite database diff --git a/commands/docs/stor_reset.md b/commands/docs/stor_reset.md index 18eb47480a0..cb4e536b043 100644 --- a/commands/docs/stor_reset.md +++ b/commands/docs/stor_reset.md @@ -2,7 +2,7 @@ title: stor reset categories: | database -version: 0.113.0 +version: 0.114.0 database: | Reset the in-memory database by dropping all tables. usage: | diff --git a/commands/docs/stor_update.md b/commands/docs/stor_update.md index ee3de7867bc..71e5c79d6b2 100644 --- a/commands/docs/stor_update.md +++ b/commands/docs/stor_update.md @@ -2,7 +2,7 @@ title: stor update categories: | database -version: 0.113.0 +version: 0.114.0 database: | Update information in a specified table in the in-memory sqlite database. usage: | diff --git a/commands/docs/str.md b/commands/docs/str.md index 170924f48f0..18f87bae131 100644 --- a/commands/docs/str.md +++ b/commands/docs/str.md @@ -2,7 +2,7 @@ title: str categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Various commands for working with string data. usage: | @@ -45,6 +45,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`str join`](/commands/docs/str_join.md) | Concatenate multiple strings into a single string, with an optional separator between each. | built-in | | [`str kebab-case`](/commands/docs/str_kebab-case.md) | Convert a string to kebab-case. | built-in | | [`str length`](/commands/docs/str_length.md) | Output the length of any strings in the pipeline. | built-in | +| [`str lowercase`](/commands/docs/str_lowercase.md) | Convert text to lowercase. | built-in | | [`str pascal-case`](/commands/docs/str_pascal-case.md) | Convert a string to PascalCase. | built-in | | [`str replace`](/commands/docs/str_replace.md) | Find and replace text in the input string. | built-in | | [`str reverse`](/commands/docs/str_reverse.md) | Reverse every string in the pipeline. | built-in | @@ -55,4 +56,5 @@ You must use one of the following subcommands. Using this command as-is will onl | [`str substring`](/commands/docs/str_substring.md) | Get part of a string. Note that the first character of a string is index 0. | built-in | | [`str title-case`](/commands/docs/str_title-case.md) | Convert a string to Title Case. | built-in | | [`str trim`](/commands/docs/str_trim.md) | Trim whitespace or specific character. | built-in | -| [`str upcase`](/commands/docs/str_upcase.md) | Convert text to uppercase. | built-in | \ No newline at end of file +| [`str upcase`](/commands/docs/str_upcase.md) | Convert text to uppercase. | built-in | +| [`str uppercase`](/commands/docs/str_uppercase.md) | Convert text to uppercase. | built-in | \ No newline at end of file diff --git a/commands/docs/str_camel-case.md b/commands/docs/str_camel-case.md index 517cf1a0fa9..d01721e59b6 100644 --- a/commands/docs/str_camel-case.md +++ b/commands/docs/str_camel-case.md @@ -2,7 +2,7 @@ title: str camel-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to camelCase. usage: | diff --git a/commands/docs/str_capitalize.md b/commands/docs/str_capitalize.md index fbd22038f48..b299da53070 100644 --- a/commands/docs/str_capitalize.md +++ b/commands/docs/str_capitalize.md @@ -2,7 +2,7 @@ title: str capitalize categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Capitalize the first letter of text. usage: | diff --git a/commands/docs/str_contains.md b/commands/docs/str_contains.md index 092c8d6c56d..4e3c784cff6 100644 --- a/commands/docs/str_contains.md +++ b/commands/docs/str_contains.md @@ -2,7 +2,7 @@ title: str contains categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Checks if string input contains a substring. usage: | diff --git a/commands/docs/str_distance.md b/commands/docs/str_distance.md index 760f25903ec..8ed070a05d2 100644 --- a/commands/docs/str_distance.md +++ b/commands/docs/str_distance.md @@ -2,7 +2,7 @@ title: str distance categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Compare two strings and return the edit distance/Levenshtein distance. usage: | diff --git a/commands/docs/str_downcase.md b/commands/docs/str_downcase.md index 20165a9f58f..d192b3190af 100644 --- a/commands/docs/str_downcase.md +++ b/commands/docs/str_downcase.md @@ -2,7 +2,7 @@ title: str downcase categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert text to lowercase. usage: | diff --git a/commands/docs/str_ends-with.md b/commands/docs/str_ends-with.md index 32f5abb2f53..9e3f12cce29 100644 --- a/commands/docs/str_ends-with.md +++ b/commands/docs/str_ends-with.md @@ -2,7 +2,7 @@ title: str ends-with categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Check if an input ends with a string. usage: | diff --git a/commands/docs/str_escape-regex.md b/commands/docs/str_escape-regex.md index ecd1383951f..1338a3ed11d 100644 --- a/commands/docs/str_escape-regex.md +++ b/commands/docs/str_escape-regex.md @@ -2,7 +2,7 @@ title: str escape-regex categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Escapes special characters in the input string with '\'. usage: | diff --git a/commands/docs/str_expand.md b/commands/docs/str_expand.md index 294639f2a86..0d770b86803 100644 --- a/commands/docs/str_expand.md +++ b/commands/docs/str_expand.md @@ -2,7 +2,7 @@ title: str expand categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Generates all possible combinations defined in brace expansion syntax. usage: | diff --git a/commands/docs/str_index-of.md b/commands/docs/str_index-of.md index 8fc09900e54..d0f1f22fb21 100644 --- a/commands/docs/str_index-of.md +++ b/commands/docs/str_index-of.md @@ -2,7 +2,7 @@ title: str index-of categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Returns start index of first occurrence of string in input, or -1 if no match. usage: | @@ -55,6 +55,12 @@ Count length using grapheme clusters. 4 ``` +A match that falls inside a grapheme cluster is reported as not found. +```nu +> '🇯🇵' | str index-of --grapheme-clusters '🇵' +-1 +``` + Returns index of string in input within a`rhs open range`. ```nu > '.rb.rb' | str index-of '.rb' --range 1.. diff --git a/commands/docs/str_join.md b/commands/docs/str_join.md index 844cafa22d1..c488efeaa68 100644 --- a/commands/docs/str_join.md +++ b/commands/docs/str_join.md @@ -2,7 +2,7 @@ title: str join categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Concatenate multiple strings into a single string, with an optional separator between each. usage: | diff --git a/commands/docs/str_kebab-case.md b/commands/docs/str_kebab-case.md index a9305a81650..ee67db290fd 100644 --- a/commands/docs/str_kebab-case.md +++ b/commands/docs/str_kebab-case.md @@ -2,7 +2,7 @@ title: str kebab-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to kebab-case. usage: | diff --git a/commands/docs/str_length.md b/commands/docs/str_length.md index 118735c7fdf..66e391c29b1 100644 --- a/commands/docs/str_length.md +++ b/commands/docs/str_length.md @@ -2,7 +2,7 @@ title: str length categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Output the length of any strings in the pipeline. usage: | diff --git a/commands/docs/str_lowercase.md b/commands/docs/str_lowercase.md new file mode 100644 index 00000000000..b8c06fa6f3f --- /dev/null +++ b/commands/docs/str_lowercase.md @@ -0,0 +1,70 @@ +--- +title: str lowercase +categories: | + strings +version: 0.114.0 +strings: | + Convert text to lowercase. +usage: | + Convert text to lowercase. +editLink: false +contributors: false +--- + + +# `str lowercase` for [strings](/commands/categories/strings.md) + +
Convert text to lowercase.
+ +## Signature + +```> str lowercase {flags} ...rest``` + +## Parameters + + - `...rest`: For a data structure input, convert strings at the given cell paths. + + +## Input/output types: + +| input | output | +| ------------ | ------------ | +| string | string | +| list<string> | list<string> | +| table | table | +| record | record | +## Examples + +Lowercase contents. +```nu +> 'NU' | str lowercase +nu +``` + +Lowercase contents. +```nu +> 'TESTa' | str lowercase +testa +``` + +Lowercase contents. +```nu +> [[ColA ColB]; [Test ABC]] | str lowercase ColA +╭───┬──────┬──────╮ +│ # │ ColA │ ColB │ +├───┼──────┼──────┤ +│ 0 │ test │ ABC │ +╰───┴──────┴──────╯ + +``` + +Lowercase contents. +```nu +> [[ColA ColB]; [Test ABC]] | str lowercase ColA ColB +╭───┬──────┬──────╮ +│ # │ ColA │ ColB │ +├───┼──────┼──────┤ +│ 0 │ test │ abc │ +╰───┴──────┴──────╯ + +``` diff --git a/commands/docs/str_pascal-case.md b/commands/docs/str_pascal-case.md index a9bcf5d4c06..374707d5480 100644 --- a/commands/docs/str_pascal-case.md +++ b/commands/docs/str_pascal-case.md @@ -2,7 +2,7 @@ title: str pascal-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to PascalCase. usage: | diff --git a/commands/docs/str_replace.md b/commands/docs/str_replace.md index df2880ecfec..18cee52d8ca 100644 --- a/commands/docs/str_replace.md +++ b/commands/docs/str_replace.md @@ -2,7 +2,7 @@ title: str replace categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Find and replace text in the input string. usage: | diff --git a/commands/docs/str_reverse.md b/commands/docs/str_reverse.md index 6c6174f98ed..24e4be13951 100644 --- a/commands/docs/str_reverse.md +++ b/commands/docs/str_reverse.md @@ -2,7 +2,7 @@ title: str reverse categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Reverse every string in the pipeline. usage: | diff --git a/commands/docs/str_screaming-snake-case.md b/commands/docs/str_screaming-snake-case.md index 91b12ec5b37..de8342d8d9f 100644 --- a/commands/docs/str_screaming-snake-case.md +++ b/commands/docs/str_screaming-snake-case.md @@ -2,7 +2,7 @@ title: str screaming-snake-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to SCREAMING_SNAKE_CASE. usage: | diff --git a/commands/docs/str_snake-case.md b/commands/docs/str_snake-case.md index 41734f37edc..3ad45808309 100644 --- a/commands/docs/str_snake-case.md +++ b/commands/docs/str_snake-case.md @@ -2,7 +2,7 @@ title: str snake-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to snake_case. usage: | diff --git a/commands/docs/str_starts-with.md b/commands/docs/str_starts-with.md index 78bb2f5e1ce..5e9e2c91a04 100644 --- a/commands/docs/str_starts-with.md +++ b/commands/docs/str_starts-with.md @@ -2,7 +2,7 @@ title: str starts-with categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Check if an input starts with a string. usage: | diff --git a/commands/docs/str_stats.md b/commands/docs/str_stats.md index 9e8855c4623..4ec6b7a24db 100644 --- a/commands/docs/str_stats.md +++ b/commands/docs/str_stats.md @@ -2,7 +2,7 @@ title: str stats categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Gather word count statistics on the text. usage: | diff --git a/commands/docs/str_substring.md b/commands/docs/str_substring.md index f4e7638de0c..d6fd7416179 100644 --- a/commands/docs/str_substring.md +++ b/commands/docs/str_substring.md @@ -2,7 +2,7 @@ title: str substring categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Get part of a string. Note that the first character of a string is index 0. usage: | diff --git a/commands/docs/str_title-case.md b/commands/docs/str_title-case.md index 8d75e5e569d..ef68b581745 100644 --- a/commands/docs/str_title-case.md +++ b/commands/docs/str_title-case.md @@ -2,7 +2,7 @@ title: str title-case categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert a string to Title Case. usage: | diff --git a/commands/docs/str_trim.md b/commands/docs/str_trim.md index 2978285b715..96b1d17b3a6 100644 --- a/commands/docs/str_trim.md +++ b/commands/docs/str_trim.md @@ -2,7 +2,7 @@ title: str trim categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Trim whitespace or specific character. usage: | diff --git a/commands/docs/str_upcase.md b/commands/docs/str_upcase.md index 0e7992dd497..fe8a1f384a0 100644 --- a/commands/docs/str_upcase.md +++ b/commands/docs/str_upcase.md @@ -2,7 +2,7 @@ title: str upcase categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Convert text to uppercase. usage: | diff --git a/commands/docs/str_uppercase.md b/commands/docs/str_uppercase.md new file mode 100644 index 00000000000..ce9f4a27565 --- /dev/null +++ b/commands/docs/str_uppercase.md @@ -0,0 +1,42 @@ +--- +title: str uppercase +categories: | + strings +version: 0.114.0 +strings: | + Convert text to uppercase. +usage: | + Convert text to uppercase. +editLink: false +contributors: false +--- + + +# `str uppercase` for [strings](/commands/categories/strings.md) + +
Convert text to uppercase.
+ +## Signature + +```> str uppercase {flags} ...rest``` + +## Parameters + + - `...rest`: For a data structure input, convert strings at the given cell paths. + + +## Input/output types: + +| input | output | +| ------------ | ------------ | +| string | string | +| list<string> | list<string> | +| table | table | +| record | record | +## Examples + +Uppercase contents. +```nu +> 'nu' | str uppercase +NU +``` diff --git a/commands/docs/sys.md b/commands/docs/sys.md index 65bbda8c726..c9a4b5578f6 100644 --- a/commands/docs/sys.md +++ b/commands/docs/sys.md @@ -2,7 +2,7 @@ title: sys categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system. usage: | diff --git a/commands/docs/sys_cpu.md b/commands/docs/sys_cpu.md index 7a8b7ff9915..5f07418c771 100644 --- a/commands/docs/sys_cpu.md +++ b/commands/docs/sys_cpu.md @@ -2,7 +2,7 @@ title: sys cpu categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system CPUs. usage: | diff --git a/commands/docs/sys_disks.md b/commands/docs/sys_disks.md index 6ceade0d4f8..0779c622f43 100644 --- a/commands/docs/sys_disks.md +++ b/commands/docs/sys_disks.md @@ -2,7 +2,7 @@ title: sys disks categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system disks. usage: | diff --git a/commands/docs/sys_host.md b/commands/docs/sys_host.md index 6cdb0be6deb..423aec2602f 100644 --- a/commands/docs/sys_host.md +++ b/commands/docs/sys_host.md @@ -2,7 +2,7 @@ title: sys host categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system host. usage: | diff --git a/commands/docs/sys_mem.md b/commands/docs/sys_mem.md index 2d55534ce0f..c3e71c9ca27 100644 --- a/commands/docs/sys_mem.md +++ b/commands/docs/sys_mem.md @@ -2,7 +2,7 @@ title: sys mem categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system memory. usage: | diff --git a/commands/docs/sys_net.md b/commands/docs/sys_net.md index bb3275eca27..12a50f40c3a 100644 --- a/commands/docs/sys_net.md +++ b/commands/docs/sys_net.md @@ -2,7 +2,7 @@ title: sys net categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the system network interfaces. usage: | diff --git a/commands/docs/sys_temp.md b/commands/docs/sys_temp.md index dea4a43e52d..19c79eb0089 100644 --- a/commands/docs/sys_temp.md +++ b/commands/docs/sys_temp.md @@ -2,7 +2,7 @@ title: sys temp categories: | system -version: 0.113.0 +version: 0.114.0 system: | View the temperatures of system components. usage: | diff --git a/commands/docs/sys_users.md b/commands/docs/sys_users.md index 96aa58f1bf7..754139ca454 100644 --- a/commands/docs/sys_users.md +++ b/commands/docs/sys_users.md @@ -2,7 +2,7 @@ title: sys users categories: | system -version: 0.113.0 +version: 0.114.0 system: | View information about the users on the system. usage: | diff --git a/commands/docs/table.md b/commands/docs/table.md index 85c56409602..680cdae5b3b 100644 --- a/commands/docs/table.md +++ b/commands/docs/table.md @@ -2,7 +2,7 @@ title: table categories: | viewers -version: 0.113.0 +version: 0.114.0 viewers: | Render the table. usage: | diff --git a/commands/docs/take.md b/commands/docs/take.md index 15aa85d3d69..8eaa9c5a4f1 100644 --- a/commands/docs/take.md +++ b/commands/docs/take.md @@ -2,7 +2,7 @@ title: take categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Take only the first n elements of a list, or the first n bytes of a binary value. usage: | diff --git a/commands/docs/take_until.md b/commands/docs/take_until.md index e6ce7128c61..ec88c8dedfe 100644 --- a/commands/docs/take_until.md +++ b/commands/docs/take_until.md @@ -2,7 +2,7 @@ title: take until categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Take elements of the input until a predicate is true. usage: | diff --git a/commands/docs/take_while.md b/commands/docs/take_while.md index 1e051ce97a9..753d3c72cf5 100644 --- a/commands/docs/take_while.md +++ b/commands/docs/take_while.md @@ -2,7 +2,7 @@ title: take while categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Take elements of the input while a predicate is true. usage: | diff --git a/commands/docs/tee.md b/commands/docs/tee.md index 42d5dbc80ba..59071d65bb0 100644 --- a/commands/docs/tee.md +++ b/commands/docs/tee.md @@ -2,7 +2,7 @@ title: tee categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Copy a stream to another command in parallel. usage: | diff --git a/commands/docs/term.md b/commands/docs/term.md index c290a1823d9..dd591fe8853 100644 --- a/commands/docs/term.md +++ b/commands/docs/term.md @@ -2,7 +2,7 @@ title: term categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Commands for querying information about the terminal. usage: | diff --git a/commands/docs/term_query.md b/commands/docs/term_query.md index 9ec93bc249d..292f8eb3413 100644 --- a/commands/docs/term_query.md +++ b/commands/docs/term_query.md @@ -2,7 +2,7 @@ title: term query categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Query the terminal for information. usage: | diff --git a/commands/docs/term_size.md b/commands/docs/term_size.md index 8f1d3c24896..0710004e939 100644 --- a/commands/docs/term_size.md +++ b/commands/docs/term_size.md @@ -2,7 +2,7 @@ title: term size categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Returns a record containing the number of columns (width) and rows (height) of the terminal. usage: | diff --git a/commands/docs/timeit.md b/commands/docs/timeit.md index 994d6442426..36942d99037 100644 --- a/commands/docs/timeit.md +++ b/commands/docs/timeit.md @@ -2,7 +2,7 @@ title: timeit categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Time how long it takes a closure to run. usage: | diff --git a/commands/docs/to.md b/commands/docs/to.md index e0f304453db..da2c9d9a220 100644 --- a/commands/docs/to.md +++ b/commands/docs/to.md @@ -2,7 +2,7 @@ title: to categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Translate structured data to various formats. usage: | @@ -36,6 +36,7 @@ You must use one of the following subcommands. Using this command as-is will onl | [`to csv`](/commands/docs/to_csv.md) | Convert table into .csv text . | built-in | | [`to html`](/commands/docs/to_html.md) | Convert table into simple HTML. | built-in | | [`to json`](/commands/docs/to_json.md) | Converts table data into JSON text. | built-in | +| [`to kdl`](/commands/docs/to_kdl.md) | Converts table data into KDL text. | built-in | | [`to md`](/commands/docs/to_md.md) | Convert table into simple Markdown. | built-in | | [`to msgpack`](/commands/docs/to_msgpack.md) | Convert Nu values into MessagePack. | built-in | | [`to msgpackz`](/commands/docs/to_msgpackz.md) | Convert Nu values into brotli-compressed MessagePack. | built-in | diff --git a/commands/docs/to_csv.md b/commands/docs/to_csv.md index 87fc83871e7..e02f95c1090 100644 --- a/commands/docs/to_csv.md +++ b/commands/docs/to_csv.md @@ -2,7 +2,7 @@ title: to csv categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into .csv text . usage: | diff --git a/commands/docs/to_html.md b/commands/docs/to_html.md index b699651c964..582726e1045 100644 --- a/commands/docs/to_html.md +++ b/commands/docs/to_html.md @@ -2,7 +2,7 @@ title: to html categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into simple HTML. usage: | diff --git a/commands/docs/to_json.md b/commands/docs/to_json.md index 81b037b5d06..003dccfa949 100644 --- a/commands/docs/to_json.md +++ b/commands/docs/to_json.md @@ -2,7 +2,7 @@ title: to json categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Converts table data into JSON text. usage: | diff --git a/commands/docs/to_kdl.md b/commands/docs/to_kdl.md new file mode 100644 index 00000000000..87c9784089a --- /dev/null +++ b/commands/docs/to_kdl.md @@ -0,0 +1,76 @@ +--- +title: to kdl +categories: | + formats +version: 0.114.0 +formats: | + Converts table data into KDL text. +usage: | + Converts table data into KDL text. +editLink: false +contributors: false +--- + + +# `to kdl` for [formats](/commands/categories/formats.md) + +
Converts table data into KDL text.
+ +## Signature + +```> to kdl {flags} ``` + +## Flags + + - `--serialize, -s`: Serialize nushell types that cannot be deserialized. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | string | +## Examples + +Convert yaml file to kdl file +```nu +> {this: that list: [1 2 3 {bool: true} {this: should be: a-block}]} | to yaml | from yaml | to kdl +this that +list 1 2 3 bool=#true { + this should + be a-block +} + +``` + +Convert nu record to kdl +```nu +> {one: [{one: two, 1: 2} {three: 3} [1 2 3] 4 5 6 {bool: true}] } | to kdl +one three=3 1 2 3 4 5 6 bool=#true { + one two + "1" 2 +} + +``` + +Convert nu list to kdl string +```nu +> [1 2 3] | to kdl +root 1 2 3 + +``` + +Convert nu closure to kdl string +```nu +> {2: {|| 1 + 1} } | to kdl --serialize +"2" "{|| 1 + 1}" + +``` + +Round-trip KDL through canonical node rows. +```nu +> 'node one; node two' | from kdl | to kdl +node one +node two + +``` diff --git a/commands/docs/to_md.md b/commands/docs/to_md.md index acdcfd83838..3f1279163ed 100644 --- a/commands/docs/to_md.md +++ b/commands/docs/to_md.md @@ -2,7 +2,7 @@ title: to md categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into simple Markdown. usage: | diff --git a/commands/docs/to_msgpack.md b/commands/docs/to_msgpack.md index 2e601a7a31e..248d22b9b26 100644 --- a/commands/docs/to_msgpack.md +++ b/commands/docs/to_msgpack.md @@ -2,7 +2,7 @@ title: to msgpack categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert Nu values into MessagePack. usage: | diff --git a/commands/docs/to_msgpackz.md b/commands/docs/to_msgpackz.md index 6596d27cd51..35a75070f11 100644 --- a/commands/docs/to_msgpackz.md +++ b/commands/docs/to_msgpackz.md @@ -2,7 +2,7 @@ title: to msgpackz categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert Nu values into brotli-compressed MessagePack. usage: | diff --git a/commands/docs/to_nuon.md b/commands/docs/to_nuon.md index 7510fed3774..cd02c7d9d89 100644 --- a/commands/docs/to_nuon.md +++ b/commands/docs/to_nuon.md @@ -2,7 +2,7 @@ title: to nuon categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Converts table data into Nuon (Nushell Object Notation) text. usage: | @@ -22,13 +22,14 @@ contributors: false ## Flags - - `--raw, -r`: Remove all of the whitespace (overwrites -i and -t). + - `--raw, -r`: Remove all of the whitespace (overwrites -i, -t, and -p). - `--indent, -i {number}`: Specify indentation width. - `--tabs, -t {number}`: Specify indentation tab quantity. - `--serialize, -s`: Serialize nushell types that cannot be deserialized. - `--raw-strings, -R`: Use raw string syntax (r#'...'#) for strings with quotes or backslashes. - `--list-of-records, -l`: Serialize table values as list-of-records instead of table syntax. - `--no-commas, -c`: Do not use commas between items in tables and lists. + - `--pretty, -p`: Format output with indentation and aligned table columns. ## Input/output types: @@ -114,3 +115,13 @@ Output a record without commas between fields. > {a: 1, b: 2} | to nuon --no-commas {a: 1 b: 2} ``` + +Format output with pretty indentation and aligned table columns. +```nu +> [[name, age]; [Alice, 30], [Bob, 25]] | to nuon --pretty +[ + [name, age]; + [Alice, 30], + [Bob, 25] +] +``` diff --git a/commands/docs/to_plist.md b/commands/docs/to_plist.md index d07c8c82cb2..ab8440b1a47 100644 --- a/commands/docs/to_plist.md +++ b/commands/docs/to_plist.md @@ -2,7 +2,7 @@ title: to plist categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert Nu values into plist usage: | diff --git a/commands/docs/to_text.md b/commands/docs/to_text.md index 9faf4a0cc24..4c6ea09e820 100644 --- a/commands/docs/to_text.md +++ b/commands/docs/to_text.md @@ -2,7 +2,7 @@ title: to text categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert data into plain text format. usage: | diff --git a/commands/docs/to_toml.md b/commands/docs/to_toml.md index 91a1b142832..1014c708d33 100644 --- a/commands/docs/to_toml.md +++ b/commands/docs/to_toml.md @@ -2,7 +2,7 @@ title: to toml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert record into .toml text. usage: | diff --git a/commands/docs/to_tsv.md b/commands/docs/to_tsv.md index 1762f41faf5..739a0dee2f5 100644 --- a/commands/docs/to_tsv.md +++ b/commands/docs/to_tsv.md @@ -2,7 +2,7 @@ title: to tsv categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into .tsv text. usage: | diff --git a/commands/docs/to_xml.md b/commands/docs/to_xml.md index 22632b61ad4..9728d7e79c9 100644 --- a/commands/docs/to_xml.md +++ b/commands/docs/to_xml.md @@ -2,7 +2,7 @@ title: to xml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert special record structure into .xml text. usage: | diff --git a/commands/docs/to_yaml.md b/commands/docs/to_yaml.md index 5b61bb48aea..cb0905a513b 100644 --- a/commands/docs/to_yaml.md +++ b/commands/docs/to_yaml.md @@ -2,7 +2,7 @@ title: to yaml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into .yaml/.yml text. usage: | diff --git a/commands/docs/to_yml.md b/commands/docs/to_yml.md index 7e60d649a58..ed6d3567e61 100644 --- a/commands/docs/to_yml.md +++ b/commands/docs/to_yml.md @@ -2,7 +2,7 @@ title: to yml categories: | formats -version: 0.113.0 +version: 0.114.0 formats: | Convert table into .yaml/.yml text. usage: | diff --git a/commands/docs/touch.md b/commands/docs/touch.md index d5ef7c2f60e..970c199c023 100644 --- a/commands/docs/touch.md +++ b/commands/docs/touch.md @@ -2,7 +2,7 @@ title: touch categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Creates one or more files. usage: | diff --git a/commands/docs/transpose.md b/commands/docs/transpose.md index e18c3e56f5b..80decd1774a 100644 --- a/commands/docs/transpose.md +++ b/commands/docs/transpose.md @@ -2,7 +2,7 @@ title: transpose categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Transposes the table contents so rows become columns and columns become rows. usage: | diff --git a/commands/docs/try.md b/commands/docs/try.md index 6fc62307e5e..23fcb2eba2d 100644 --- a/commands/docs/try.md +++ b/commands/docs/try.md @@ -2,7 +2,7 @@ title: try categories: | core -version: 0.113.0 +version: 0.114.0 core: | Try to run a block, if it fails optionally run a catch closure. usage: | diff --git a/commands/docs/tutor.md b/commands/docs/tutor.md index 107bdf6258e..bbe271215d1 100644 --- a/commands/docs/tutor.md +++ b/commands/docs/tutor.md @@ -2,7 +2,7 @@ title: tutor categories: | misc -version: 0.113.0 +version: 0.114.0 misc: | Run the tutorial. To begin, run: tutor. usage: | diff --git a/commands/docs/ulimit.md b/commands/docs/ulimit.md index c4c29da1acc..52c531188f0 100644 --- a/commands/docs/ulimit.md +++ b/commands/docs/ulimit.md @@ -2,7 +2,7 @@ title: ulimit categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Set or get resource usage limits. usage: | diff --git a/commands/docs/umask.md b/commands/docs/umask.md index 40098b83012..b9bec08aab9 100644 --- a/commands/docs/umask.md +++ b/commands/docs/umask.md @@ -2,7 +2,7 @@ title: umask categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Get or set default file creation permissions. usage: | diff --git a/commands/docs/uname.md b/commands/docs/uname.md index ef9b6be19b2..b4f82b392e6 100644 --- a/commands/docs/uname.md +++ b/commands/docs/uname.md @@ -2,7 +2,7 @@ title: uname categories: | system -version: 0.113.0 +version: 0.114.0 system: | Print certain system information using uutils/coreutils uname. usage: | diff --git a/commands/docs/union.md b/commands/docs/union.md new file mode 100644 index 00000000000..f1ab3331654 --- /dev/null +++ b/commands/docs/union.md @@ -0,0 +1,73 @@ +--- +title: union +categories: | + filters +version: 0.114.0 +filters: | + Returns a list of unique elements from both the input and the provided list. +usage: | + Returns a list of unique elements from both the input and the provided list. +editLink: false +contributors: false +--- + + +# `union` for [filters](/commands/categories/filters.md) + +
Returns a list of unique elements from both the input and the provided list.
+ +## Signature + +```> union {flags} (other)``` + +## Parameters + + - `other`: The other list to union with. + + +## Input/output types: + +| input | output | +| --------- | --------- | +| list<any> | list<any> | +| table | table | +## Examples + +Return the union of two lists +```nu +> [1 2 3 4] | union [3 4 5 6] +╭───┬───╮ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ +│ 3 │ 4 │ +│ 4 │ 5 │ +│ 5 │ 6 │ +╰───┴───╯ + +``` + +Union with duplicates in input +```nu +> [1 1 2 3] | union [2 3 4] +╭───┬───╮ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ +│ 3 │ 4 │ +╰───┴───╯ + +``` + +Union of two tables (dedup rows) +```nu +> [{a:1} {a:2}] | union [{a:2} {a:3}] +╭───┬───╮ +│ # │ a │ +├───┼───┤ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ +╰───┴───╯ + +``` diff --git a/commands/docs/uniq-by.md b/commands/docs/uniq-by.md index d7412805a23..159bae2f9e6 100644 --- a/commands/docs/uniq-by.md +++ b/commands/docs/uniq-by.md @@ -2,7 +2,7 @@ title: uniq-by categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Return the distinct values in the input by the given column(s). usage: | diff --git a/commands/docs/uniq.md b/commands/docs/uniq.md index a8fff6d933e..c10fae57bf0 100644 --- a/commands/docs/uniq.md +++ b/commands/docs/uniq.md @@ -2,7 +2,7 @@ title: uniq categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Return the distinct values in the input. usage: | diff --git a/commands/docs/unlet.md b/commands/docs/unlet.md index 4223c18cb41..3c3574a4bfb 100644 --- a/commands/docs/unlet.md +++ b/commands/docs/unlet.md @@ -2,7 +2,7 @@ title: unlet categories: | experimental -version: 0.113.0 +version: 0.114.0 experimental: | Delete variables from nushell memory, making them unrecoverable. usage: | diff --git a/commands/docs/update.md b/commands/docs/update.md index 3a99ffffa6b..85a3b55a88c 100644 --- a/commands/docs/update.md +++ b/commands/docs/update.md @@ -2,7 +2,7 @@ title: update categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Update an existing column to have a new value. usage: | diff --git a/commands/docs/update_cells.md b/commands/docs/update_cells.md index 63c4ad21a2e..7c2a3a95a6f 100644 --- a/commands/docs/update_cells.md +++ b/commands/docs/update_cells.md @@ -2,7 +2,7 @@ title: update cells categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Update the table cells. usage: | diff --git a/commands/docs/upsert.md b/commands/docs/upsert.md index 79572c676d9..27132216bc3 100644 --- a/commands/docs/upsert.md +++ b/commands/docs/upsert.md @@ -2,7 +2,7 @@ title: upsert categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Update an existing column to have a new value, or insert a new column. usage: | diff --git a/commands/docs/url.md b/commands/docs/url.md index 2a257948fdc..d503014cd78 100644 --- a/commands/docs/url.md +++ b/commands/docs/url.md @@ -2,7 +2,7 @@ title: url categories: | network -version: 0.113.0 +version: 0.114.0 network: | Various commands for working with URLs. usage: | diff --git a/commands/docs/url_build-query.md b/commands/docs/url_build-query.md index e95911f32d2..00728e7302b 100644 --- a/commands/docs/url_build-query.md +++ b/commands/docs/url_build-query.md @@ -2,7 +2,7 @@ title: url build-query categories: | network -version: 0.113.0 +version: 0.114.0 network: | Converts record or table into query string applying percent-encoding. usage: | diff --git a/commands/docs/url_decode.md b/commands/docs/url_decode.md index 803a1c48c2b..f33e937d1ae 100644 --- a/commands/docs/url_decode.md +++ b/commands/docs/url_decode.md @@ -2,7 +2,7 @@ title: url decode categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Converts a percent-encoded web safe string to a string. usage: | @@ -20,6 +20,10 @@ contributors: false ```> url decode {flags} ...rest``` +## Flags + + - `--binary, -b`: Return a binary value, to allow decoding non UTF-8 text. + ## Parameters - `...rest`: For a data structure input, url decode strings at the given cell paths. @@ -30,7 +34,9 @@ contributors: false | input | output | | ------------ | ------------ | | string | string | +| string | binary | | list<string> | list<string> | +| list<string> | list<binary> | | table | table | | record | record | ## Examples @@ -51,3 +57,9 @@ Decode multiple URLs with escape characters in list. ╰───┴─────────────────────────────╯ ``` + +Decode a percent-encoded iso-8859-1 string. +```nu +> '%A3%20rates' | url decode --binary | decode iso-8859-1 +£ rates +``` diff --git a/commands/docs/url_encode.md b/commands/docs/url_encode.md index 05359fc3b5a..1be9c8c5df0 100644 --- a/commands/docs/url_encode.md +++ b/commands/docs/url_encode.md @@ -2,7 +2,7 @@ title: url encode categories: | strings -version: 0.113.0 +version: 0.114.0 strings: | Converts a string to a percent encoded web safe string. usage: | @@ -31,12 +31,13 @@ contributors: false ## Input/output types: -| input | output | -| ------------ | ------------ | -| string | string | -| list<string> | list<string> | -| table | table | -| record | record | +| input | output | +| --------------------------- | ------------ | +| string | string | +| binary | string | +| list<oneof<string, binary>> | list<string> | +| table | table | +| record | record | ## Examples Encode a URL with escape characters. @@ -61,3 +62,9 @@ Encode all non alphanumeric chars with all flag. > 'https://example.com/foo bar' | url encode --all https%3A%2F%2Fexample%2Ecom%2Ffoo%20bar ``` + +Encode a iso-8859-1 encoded string. +```nu +> '£ rates' | encode iso-8859-1 | url encode +%A3%20rates +``` diff --git a/commands/docs/url_join.md b/commands/docs/url_join.md index d4ccf0f7d3a..4ba68200603 100644 --- a/commands/docs/url_join.md +++ b/commands/docs/url_join.md @@ -2,7 +2,7 @@ title: url join categories: | network -version: 0.113.0 +version: 0.114.0 network: | Convert a record to a URL string. usage: | diff --git a/commands/docs/url_parse.md b/commands/docs/url_parse.md index c9c7e9ad2fb..d1cbe850c44 100644 --- a/commands/docs/url_parse.md +++ b/commands/docs/url_parse.md @@ -2,7 +2,7 @@ title: url parse categories: | network -version: 0.113.0 +version: 0.114.0 network: | Parse a URL string into structured data. usage: | diff --git a/commands/docs/url_split-query.md b/commands/docs/url_split-query.md index 39243f7f446..510ab929f29 100644 --- a/commands/docs/url_split-query.md +++ b/commands/docs/url_split-query.md @@ -2,7 +2,7 @@ title: url split-query categories: | network -version: 0.113.0 +version: 0.114.0 network: | Converts query string into table applying percent-decoding. usage: | diff --git a/commands/docs/use.md b/commands/docs/use.md index e7014e42ea1..72087475693 100644 --- a/commands/docs/use.md +++ b/commands/docs/use.md @@ -2,7 +2,7 @@ title: use categories: | core -version: 0.113.0 +version: 0.114.0 core: | Use definitions from a module, making them available in your shell. usage: | diff --git a/commands/docs/values.md b/commands/docs/values.md index 2d28a93a77f..94de84cd5bf 100644 --- a/commands/docs/values.md +++ b/commands/docs/values.md @@ -2,7 +2,7 @@ title: values categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Given a record or table, produce a list of its columns' values. usage: | diff --git a/commands/docs/version.md b/commands/docs/version.md index c16978d93be..add1abb1890 100644 --- a/commands/docs/version.md +++ b/commands/docs/version.md @@ -2,7 +2,7 @@ title: version categories: | core -version: 0.113.0 +version: 0.114.0 core: | Display Nu version, and its build configuration. usage: | diff --git a/commands/docs/version_check.md b/commands/docs/version_check.md index 0773c170a89..370f13048ad 100644 --- a/commands/docs/version_check.md +++ b/commands/docs/version_check.md @@ -2,7 +2,7 @@ title: version check categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Checks to see if you have the latest version of nushell. usage: | diff --git a/commands/docs/view.md b/commands/docs/view.md index 7caf99ae423..9fb1674abb2 100644 --- a/commands/docs/view.md +++ b/commands/docs/view.md @@ -2,7 +2,7 @@ title: view categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | Various commands for viewing debug information. usage: | diff --git a/commands/docs/view_blocks.md b/commands/docs/view_blocks.md index 6637e2615e5..bfb1cb073f9 100644 --- a/commands/docs/view_blocks.md +++ b/commands/docs/view_blocks.md @@ -2,7 +2,7 @@ title: view blocks categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View the blocks registered in nushell's EngineState memory. usage: | diff --git a/commands/docs/view_files.md b/commands/docs/view_files.md index ea616bb60dc..e8684b4d709 100644 --- a/commands/docs/view_files.md +++ b/commands/docs/view_files.md @@ -2,7 +2,7 @@ title: view files categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View the files registered in nushell's EngineState memory. usage: | diff --git a/commands/docs/view_ir.md b/commands/docs/view_ir.md index 98fa44c963c..024a714d670 100644 --- a/commands/docs/view_ir.md +++ b/commands/docs/view_ir.md @@ -2,7 +2,7 @@ title: view ir categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View the compiled IR code for a block of code. usage: | diff --git a/commands/docs/view_source.md b/commands/docs/view_source.md index 991007a645e..79dc2643bc5 100644 --- a/commands/docs/view_source.md +++ b/commands/docs/view_source.md @@ -2,7 +2,7 @@ title: view source categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View a block, module, or a definition. usage: | diff --git a/commands/docs/view_span.md b/commands/docs/view_span.md index 55513c0cec7..9bed7c60892 100644 --- a/commands/docs/view_span.md +++ b/commands/docs/view_span.md @@ -2,7 +2,7 @@ title: view span categories: | debug -version: 0.113.0 +version: 0.114.0 debug: | View the contents of a span. usage: | diff --git a/commands/docs/watch.md b/commands/docs/watch.md index 711e5090874..1e1074305d8 100644 --- a/commands/docs/watch.md +++ b/commands/docs/watch.md @@ -2,7 +2,7 @@ title: watch categories: | filesystem -version: 0.113.0 +version: 0.114.0 filesystem: | Watch for file changes and execute Nu code when they happen. usage: | diff --git a/commands/docs/where.md b/commands/docs/where.md index c2cb9f34dfa..b6c331afc09 100644 --- a/commands/docs/where.md +++ b/commands/docs/where.md @@ -2,7 +2,7 @@ title: where categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Filter values of an input list based on a condition. usage: | diff --git a/commands/docs/which.md b/commands/docs/which.md index d86c7624be4..ba6f0764325 100644 --- a/commands/docs/which.md +++ b/commands/docs/which.md @@ -2,7 +2,7 @@ title: which categories: | system -version: 0.113.0 +version: 0.114.0 system: | Finds a program file, alias or custom command. If `application` is not provided, all deduplicated commands will be returned. usage: | diff --git a/commands/docs/while.md b/commands/docs/while.md index 3a2a858ec61..765b3eaf567 100644 --- a/commands/docs/while.md +++ b/commands/docs/while.md @@ -2,7 +2,7 @@ title: while categories: | core -version: 0.113.0 +version: 0.114.0 core: | Conditionally run a block in a loop. usage: | diff --git a/commands/docs/whoami.md b/commands/docs/whoami.md index 5ed03a9238f..3c70bc27f97 100644 --- a/commands/docs/whoami.md +++ b/commands/docs/whoami.md @@ -2,7 +2,7 @@ title: whoami categories: | platform -version: 0.113.0 +version: 0.114.0 platform: | Get the current username using uutils/coreutils whoami. usage: | diff --git a/commands/docs/window.md b/commands/docs/window.md index 9492e65b066..e5466880db9 100644 --- a/commands/docs/window.md +++ b/commands/docs/window.md @@ -2,7 +2,7 @@ title: window categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Creates a sliding window of `window_size` that slide by n rows/elements across input. usage: | diff --git a/commands/docs/with-env.md b/commands/docs/with-env.md index cecd27d25a1..5ff0cf179d0 100644 --- a/commands/docs/with-env.md +++ b/commands/docs/with-env.md @@ -2,7 +2,7 @@ title: with-env categories: | env -version: 0.113.0 +version: 0.114.0 env: | Runs a block with an environment variable set. usage: | diff --git a/commands/docs/wrap.md b/commands/docs/wrap.md index eb4fe9c2136..6a7bdc956bd 100644 --- a/commands/docs/wrap.md +++ b/commands/docs/wrap.md @@ -2,7 +2,7 @@ title: wrap categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Wrap the value into a column. usage: | diff --git a/commands/docs/zip.md b/commands/docs/zip.md index ce57bf7c39f..9bf8856cf46 100644 --- a/commands/docs/zip.md +++ b/commands/docs/zip.md @@ -2,7 +2,7 @@ title: zip categories: | filters -version: 0.113.0 +version: 0.114.0 filters: | Combine a stream with the input. usage: | diff --git a/make_docs.nu b/make_docs.nu index b86efd95755..3c2a2ae275c 100644 --- a/make_docs.nu +++ b/make_docs.nu @@ -27,10 +27,15 @@ def plugin-paths [ nu_path?: path ] { $decorated | where exists | get path } +def plugin-args [plugins: list] { + $plugins | each {|plugin| ['--plugins' $plugin] } | flatten +} + # get all command names from a clean scope def command-names [] { let plugins = (plugin-paths) - nu --no-config-file --plugins ...$plugins --commands $'scope commands | select name | to json' + let plugin_args = (plugin-args $plugins) + nu --no-config-file ...$plugin_args --commands $'scope commands | select name | to json' | from json } @@ -62,7 +67,8 @@ def make_docs [ ] { let $nu_path = ($nu_path | default $nu.current-exe) let plugins = (plugin-paths $nu_path) - run-external $nu_path "--no-config-file" "--plugins" ...$plugins "make_docs.nu" + let plugin_args = (plugin-args $plugins) + run-external $nu_path "--no-config-file" ...$plugin_args "make_docs.nu" } # generate the YAML frontmatter of a command