diff --git a/commands/docs/alias.md b/commands/docs/alias.md index a392ee8d9ed..fc429973427 100644 --- a/commands/docs/alias.md +++ b/commands/docs/alias.md @@ -2,7 +2,7 @@ title: alias categories: | core -version: 0.103.0 +version: 0.104.0 core: | Alias a command (with optional flags) to a new name. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Alias ll to ls -l diff --git a/commands/docs/all.md b/commands/docs/all.md index 5e60a8721d8..e2179942981 100644 --- a/commands/docs/all.md +++ b/commands/docs/all.md @@ -2,7 +2,7 @@ title: all categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Test if every element of the input fulfills a predicate expression. usage: | @@ -30,9 +30,14 @@ contributors: false | input | output | | --------- | ------ | | list\ | bool | - ## Examples +Check if a list contains only true values +```nu +> [false true true false] | all {} +false +``` + Check if each row's status is the string 'UP' ```nu > [[status]; [UP] [UP]] | all {|el| $el.status == UP } diff --git a/commands/docs/ansi.md b/commands/docs/ansi.md index 7eb2418b941..b6ecb14cf31 100644 --- a/commands/docs/ansi.md +++ b/commands/docs/ansi.md @@ -2,7 +2,7 @@ title: ansi categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Output ANSI codes to change color and style of text. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Change color to green (see how the next example text will be green!) diff --git a/commands/docs/ansi_gradient.md b/commands/docs/ansi_gradient.md index 29a26972a7e..f77045575a4 100644 --- a/commands/docs/ansi_gradient.md +++ b/commands/docs/ansi_gradient.md @@ -2,7 +2,7 @@ title: ansi gradient categories: | platform -version: 0.103.0 +version: 0.104.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 2d6026bbd4d..871ad374857 100644 --- a/commands/docs/ansi_link.md +++ b/commands/docs/ansi_link.md @@ -2,7 +2,7 @@ title: ansi link categories: | platform -version: 0.103.0 +version: 0.104.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 add33f96101..e65d2e6070a 100644 --- a/commands/docs/ansi_strip.md +++ b/commands/docs/ansi_strip.md @@ -2,7 +2,7 @@ title: ansi strip categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Strip ANSI escape sequences from a string. usage: | diff --git a/commands/docs/any.md b/commands/docs/any.md index c0588f9a1ea..4d77e9c176b 100644 --- a/commands/docs/any.md +++ b/commands/docs/any.md @@ -2,7 +2,7 @@ title: any categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Tests if any element of the input fulfills a predicate expression. usage: | @@ -30,9 +30,14 @@ contributors: false | input | output | | --------- | ------ | | list\ | bool | - ## Examples +Check if a list contains any true values +```nu +> [false true true false] | any {} +true +``` + Check if any row's status is the string 'DOWN' ```nu > [[status]; [UP] [DOWN] [UP]] | any {|el| $el.status == DOWN } diff --git a/commands/docs/append.md b/commands/docs/append.md index f680be28412..5ee42f60bac 100644 --- a/commands/docs/append.md +++ b/commands/docs/append.md @@ -2,7 +2,7 @@ title: append categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Append any number of rows to a table. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | --------- | | any | list\ | - ## Examples Append one int to a list diff --git a/commands/docs/ast.md b/commands/docs/ast.md index 40255ceab7c..14a9909d5c8 100644 --- a/commands/docs/ast.md +++ b/commands/docs/ast.md @@ -2,7 +2,7 @@ title: ast categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Print the abstract syntax tree (ast) for a pipeline. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Print the ast of a string diff --git a/commands/docs/attr_category.md b/commands/docs/attr_category.md index b489191cc28..f31aabe520c 100644 --- a/commands/docs/attr_category.md +++ b/commands/docs/attr_category.md @@ -2,7 +2,7 @@ title: attr category categories: | core -version: 0.103.0 +version: 0.104.0 core: | Attribute for adding a category to custom commands. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples Add a category to a custom command diff --git a/commands/docs/attr_example.md b/commands/docs/attr_example.md index 5d7f86fb143..772d73da2ab 100644 --- a/commands/docs/attr_example.md +++ b/commands/docs/attr_example.md @@ -2,7 +2,7 @@ title: attr example categories: | core -version: 0.103.0 +version: 0.104.0 core: | Attribute for adding examples to custom commands. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | -------------------------------------------- | | nothing | record\ | - ## Examples Add examples to custom command diff --git a/commands/docs/attr_search-terms.md b/commands/docs/attr_search-terms.md index db869483cb2..a0e73afd6c8 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.103.0 +version: 0.104.0 core: | Attribute for adding search terms to custom commands. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples Add search terms to a custom command diff --git a/commands/docs/banner.md b/commands/docs/banner.md index 8696cbd9057..85765183210 100644 --- a/commands/docs/banner.md +++ b/commands/docs/banner.md @@ -2,7 +2,7 @@ title: banner categories: | default -version: 0.103.0 +version: 0.104.0 default: | Print a banner for Nushell with information about the project usage: | @@ -29,4 +29,4 @@ contributors: false | input | output | | ----- | ------ | -| any | any | +| any | any | \ No newline at end of file diff --git a/commands/docs/bits.md b/commands/docs/bits.md index 270ec84a1b6..8497cece057 100644 --- a/commands/docs/bits.md +++ b/commands/docs/bits.md @@ -2,7 +2,7 @@ title: bits categories: | bits -version: 0.103.0 +version: 0.104.0 bits: | Various commands for working with bits. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/bits_and.md b/commands/docs/bits_and.md index 54457c69ddc..6c0eb0062aa 100644 --- a/commands/docs/bits_and.md +++ b/commands/docs/bits_and.md @@ -2,7 +2,7 @@ title: bits and categories: | bits -version: 0.103.0 +version: 0.104.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 019da37ea56..b44c002e34d 100644 --- a/commands/docs/bits_not.md +++ b/commands/docs/bits_not.md @@ -2,7 +2,7 @@ title: bits not categories: | bits -version: 0.103.0 +version: 0.104.0 bits: | Performs logical negation on each bit. usage: | diff --git a/commands/docs/bits_or.md b/commands/docs/bits_or.md index f0c91cecab2..0eccce1f7ce 100644 --- a/commands/docs/bits_or.md +++ b/commands/docs/bits_or.md @@ -2,7 +2,7 @@ title: bits or categories: | bits -version: 0.103.0 +version: 0.104.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 30cc3cd1d82..75f566eb993 100644 --- a/commands/docs/bits_rol.md +++ b/commands/docs/bits_rol.md @@ -2,7 +2,7 @@ title: bits rol categories: | bits -version: 0.103.0 +version: 0.104.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 6ad4ba9c2f4..a0aff54bc60 100644 --- a/commands/docs/bits_ror.md +++ b/commands/docs/bits_ror.md @@ -2,7 +2,7 @@ title: bits ror categories: | bits -version: 0.103.0 +version: 0.104.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 7b362334b2e..000f0c3ffbb 100644 --- a/commands/docs/bits_shl.md +++ b/commands/docs/bits_shl.md @@ -2,7 +2,7 @@ title: bits shl categories: | bits -version: 0.103.0 +version: 0.104.0 bits: | Bitwise shift left for ints or binary values. usage: | diff --git a/commands/docs/bits_shr.md b/commands/docs/bits_shr.md index 2c11179ca61..2399e997907 100644 --- a/commands/docs/bits_shr.md +++ b/commands/docs/bits_shr.md @@ -2,7 +2,7 @@ title: bits shr categories: | bits -version: 0.103.0 +version: 0.104.0 bits: | Bitwise shift right for ints or binary values. usage: | diff --git a/commands/docs/bits_xor.md b/commands/docs/bits_xor.md index 3da32bd370e..a7bbf668c89 100644 --- a/commands/docs/bits_xor.md +++ b/commands/docs/bits_xor.md @@ -2,7 +2,7 @@ title: bits xor categories: | bits -version: 0.103.0 +version: 0.104.0 bits: | Performs bitwise xor for ints or binary values. usage: | diff --git a/commands/docs/break.md b/commands/docs/break.md index cd70b53c397..7a21ef48de0 100644 --- a/commands/docs/break.md +++ b/commands/docs/break.md @@ -2,7 +2,7 @@ title: break categories: | core -version: 0.103.0 +version: 0.104.0 core: | Break a loop. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Break out of a loop diff --git a/commands/docs/bytes.md b/commands/docs/bytes.md index 6a14c7aa758..b54dd08c004 100644 --- a/commands/docs/bytes.md +++ b/commands/docs/bytes.md @@ -2,7 +2,7 @@ title: bytes categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Various commands for working with byte data. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/bytes_add.md b/commands/docs/bytes_add.md index 99c2c6d77ac..8ce1a216573 100644 --- a/commands/docs/bytes_add.md +++ b/commands/docs/bytes_add.md @@ -2,7 +2,7 @@ title: bytes add categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Add specified bytes to the input. usage: | diff --git a/commands/docs/bytes_at.md b/commands/docs/bytes_at.md index e04f9ee87fe..0206aba73de 100644 --- a/commands/docs/bytes_at.md +++ b/commands/docs/bytes_at.md @@ -2,7 +2,7 @@ title: bytes at categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Get bytes defined by a range. usage: | diff --git a/commands/docs/bytes_build.md b/commands/docs/bytes_build.md index 1c2991a6336..cb206b2ffcd 100644 --- a/commands/docs/bytes_build.md +++ b/commands/docs/bytes_build.md @@ -2,7 +2,7 @@ title: bytes build categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Create bytes from the arguments. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | binary | - ## Examples Builds binary data from 0x[01 02], 0x[03], 0x[04] diff --git a/commands/docs/bytes_collect.md b/commands/docs/bytes_collect.md index 0abe7316a39..e32b219648a 100644 --- a/commands/docs/bytes_collect.md +++ b/commands/docs/bytes_collect.md @@ -2,7 +2,7 @@ title: bytes collect categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Concatenate multiple binary into a single binary, with an optional separator between each. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------------ | ------ | | list\ | binary | - ## Examples Create a byte array from input diff --git a/commands/docs/bytes_ends-with.md b/commands/docs/bytes_ends-with.md index ca9001223b9..3e822114a90 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.103.0 +version: 0.104.0 bytes: | Check if bytes ends with a pattern. usage: | diff --git a/commands/docs/bytes_index-of.md b/commands/docs/bytes_index-of.md index 775300182e3..2589cd549ad 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.103.0 +version: 0.104.0 bytes: | Returns start index of first occurrence of pattern in bytes, or -1 if no match. usage: | diff --git a/commands/docs/bytes_length.md b/commands/docs/bytes_length.md index fd823eff8ff..37def5b14da 100644 --- a/commands/docs/bytes_length.md +++ b/commands/docs/bytes_length.md @@ -2,7 +2,7 @@ title: bytes length categories: | bytes -version: 0.103.0 +version: 0.104.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 ff4790818e9..7166f78bd3c 100644 --- a/commands/docs/bytes_remove.md +++ b/commands/docs/bytes_remove.md @@ -2,7 +2,7 @@ title: bytes remove categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Remove bytes. usage: | diff --git a/commands/docs/bytes_replace.md b/commands/docs/bytes_replace.md index 6acb7945525..1aa2a660844 100644 --- a/commands/docs/bytes_replace.md +++ b/commands/docs/bytes_replace.md @@ -2,7 +2,7 @@ title: bytes replace categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Find and replace binary. usage: | diff --git a/commands/docs/bytes_reverse.md b/commands/docs/bytes_reverse.md index a610028c7c3..0ad44ea455d 100644 --- a/commands/docs/bytes_reverse.md +++ b/commands/docs/bytes_reverse.md @@ -2,7 +2,7 @@ title: bytes reverse categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Reverse the bytes in the pipeline. usage: | diff --git a/commands/docs/bytes_split.md b/commands/docs/bytes_split.md index 43e6e586193..355d099a11d 100644 --- a/commands/docs/bytes_split.md +++ b/commands/docs/bytes_split.md @@ -2,7 +2,7 @@ title: bytes split categories: | bytes -version: 0.103.0 +version: 0.104.0 bytes: | Split input into multiple items using a separator. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------------ | | binary | list\ | - ## Examples Split a binary value using a binary separator diff --git a/commands/docs/bytes_starts-with.md b/commands/docs/bytes_starts-with.md index 1bc966f46ed..2af77026b10 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.103.0 +version: 0.104.0 bytes: | Check if bytes starts with a pattern. usage: | diff --git a/commands/docs/cal.md b/commands/docs/cal.md index 27c826b9656..03ea802fbb2 100644 --- a/commands/docs/cal.md +++ b/commands/docs/cal.md @@ -2,7 +2,7 @@ title: cal categories: | generators -version: 0.103.0 +version: 0.104.0 generators: | Display a calendar. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples This month's calendar diff --git a/commands/docs/cd.md b/commands/docs/cd.md index dddae6f9d38..f0840d6d7e1 100644 --- a/commands/docs/cd.md +++ b/commands/docs/cd.md @@ -2,7 +2,7 @@ title: cd categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Change directory. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Change to your home directory diff --git a/commands/docs/char.md b/commands/docs/char.md index ddc19dea8a3..8e0a30ec77c 100644 --- a/commands/docs/char.md +++ b/commands/docs/char.md @@ -2,7 +2,7 @@ title: char categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Output special characters (e.g., 'newline'). usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Output newline diff --git a/commands/docs/chunk-by.md b/commands/docs/chunk-by.md index 26715681124..6ace54eeb2e 100644 --- a/commands/docs/chunk-by.md +++ b/commands/docs/chunk-by.md @@ -2,7 +2,7 @@ title: chunk-by categories: | filters -version: 0.103.0 +version: 0.104.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 f6c67c36327..e2eb25c8ab7 100644 --- a/commands/docs/chunks.md +++ b/commands/docs/chunks.md @@ -2,7 +2,7 @@ title: chunks categories: | filters -version: 0.103.0 +version: 0.104.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 4a946bb1b6e..16777a483fb 100644 --- a/commands/docs/clear.md +++ b/commands/docs/clear.md @@ -2,7 +2,7 @@ title: clear categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Clear the terminal. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Clear the terminal diff --git a/commands/docs/collect.md b/commands/docs/collect.md index 2e6f93f0850..6c38bf2aee4 100644 --- a/commands/docs/collect.md +++ b/commands/docs/collect.md @@ -2,7 +2,7 @@ title: collect categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Collect a stream into a value. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Use the second value in the stream diff --git a/commands/docs/columns.md b/commands/docs/columns.md index 02728fe2842..a3649f8c208 100644 --- a/commands/docs/columns.md +++ b/commands/docs/columns.md @@ -2,7 +2,7 @@ title: columns categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Given a record or table, produce a list of its columns' names. usage: | diff --git a/commands/docs/commandline.md b/commands/docs/commandline.md index a7747af6114..3ec278ace37 100644 --- a/commands/docs/commandline.md +++ b/commands/docs/commandline.md @@ -2,7 +2,7 @@ title: commandline categories: | core -version: 0.103.0 +version: 0.104.0 core: | View the current command line input buffer. usage: | @@ -27,7 +27,6 @@ contributors: false | ------- | ------ | | nothing | string | - ## Subcommands: | name | description | type | diff --git a/commands/docs/commandline_edit.md b/commands/docs/commandline_edit.md index 5dde8a3088c..25016598440 100644 --- a/commands/docs/commandline_edit.md +++ b/commands/docs/commandline_edit.md @@ -2,7 +2,7 @@ title: commandline edit categories: | core -version: 0.103.0 +version: 0.104.0 core: | Modify the current command line input buffer. usage: | @@ -35,4 +35,4 @@ contributors: false | input | output | | ------- | ------- | -| nothing | nothing | +| nothing | nothing | \ No newline at end of file diff --git a/commands/docs/commandline_get-cursor.md b/commands/docs/commandline_get-cursor.md index f61afd1c741..69535597518 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.103.0 +version: 0.104.0 core: | Get the current cursor position. usage: | @@ -25,4 +25,4 @@ contributors: false | input | output | | ------- | ------ | -| nothing | int | +| nothing | int | \ No newline at end of file diff --git a/commands/docs/commandline_set-cursor.md b/commands/docs/commandline_set-cursor.md index 896f88019a6..f5c65b1383e 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.103.0 +version: 0.104.0 core: | Set the current cursor position. usage: | @@ -33,4 +33,4 @@ contributors: false | input | output | | ------- | ------- | -| nothing | nothing | +| nothing | nothing | \ No newline at end of file diff --git a/commands/docs/compact.md b/commands/docs/compact.md index 3ada80a19a7..89c04b19e9a 100644 --- a/commands/docs/compact.md +++ b/commands/docs/compact.md @@ -2,7 +2,7 @@ title: compact categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Creates a table with non-empty rows. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Filter out all records where 'Hello' is null diff --git a/commands/docs/complete.md b/commands/docs/complete.md index d4afee20897..a8f41426c56 100644 --- a/commands/docs/complete.md +++ b/commands/docs/complete.md @@ -2,7 +2,7 @@ title: complete categories: | system -version: 0.103.0 +version: 0.104.0 system: | Capture the outputs and exit code from an external piped in command in a nushell table. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------ | | any | record | - ## Examples Run the external command to completion, capturing stdout, stderr, and exit_code diff --git a/commands/docs/config.md b/commands/docs/config.md index cc2ffa83f42..05a5d377952 100644 --- a/commands/docs/config.md +++ b/commands/docs/config.md @@ -2,7 +2,7 @@ title: config categories: | env -version: 0.103.0 +version: 0.104.0 env: | Edit nushell configuration files. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/config_env.md b/commands/docs/config_env.md index 49929e1556a..3f3035c64d5 100644 --- a/commands/docs/config_env.md +++ b/commands/docs/config_env.md @@ -2,7 +2,7 @@ title: config env categories: | env -version: 0.103.0 +version: 0.104.0 env: | Edit nu environment configurations. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples open user's env.nu in the default editor diff --git a/commands/docs/config_flatten.md b/commands/docs/config_flatten.md index ccfbab5e6be..e3472aac8cf 100644 --- a/commands/docs/config_flatten.md +++ b/commands/docs/config_flatten.md @@ -2,7 +2,7 @@ title: config flatten categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Show the current configuration in a flattened form. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples Show the current configuration in a flattened form diff --git a/commands/docs/config_nu.md b/commands/docs/config_nu.md index 3dcfad5d8c4..0c765bfa69d 100644 --- a/commands/docs/config_nu.md +++ b/commands/docs/config_nu.md @@ -2,7 +2,7 @@ title: config nu categories: | env -version: 0.103.0 +version: 0.104.0 env: | Edit nu configurations. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples open user's config.nu in the default editor diff --git a/commands/docs/config_reset.md b/commands/docs/config_reset.md index 619c8215b00..9b2f15cb6a9 100644 --- a/commands/docs/config_reset.md +++ b/commands/docs/config_reset.md @@ -2,7 +2,7 @@ title: config reset categories: | env -version: 0.103.0 +version: 0.104.0 env: | Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples reset nushell configuration files diff --git a/commands/docs/config_use-colors.md b/commands/docs/config_use-colors.md index a8dafa41bb5..cfd1a5b0fd9 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.103.0 +version: 0.104.0 env: | Get the configuration for color output. usage: | @@ -26,6 +26,5 @@ contributors: false | input | output | | ------- | ------ | | nothing | bool | - ## Notes Use this command instead of checking `$env.config.use_ansi_coloring` to properly handle the "auto" setting, including environment variables that influence its behavior. \ No newline at end of file diff --git a/commands/docs/const.md b/commands/docs/const.md index 5b919161c25..682f62c55a9 100644 --- a/commands/docs/const.md +++ b/commands/docs/const.md @@ -2,7 +2,7 @@ title: const categories: | core -version: 0.103.0 +version: 0.104.0 core: | Create a parse-time constant. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Create a new parse-time constant. diff --git a/commands/docs/continue.md b/commands/docs/continue.md index 23360a73f22..46cbb1fe59a 100644 --- a/commands/docs/continue.md +++ b/commands/docs/continue.md @@ -2,7 +2,7 @@ title: continue categories: | core -version: 0.103.0 +version: 0.104.0 core: | Continue a loop from the next iteration. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Continue a loop from the next iteration diff --git a/commands/docs/cp.md b/commands/docs/cp.md index d64318ecbf9..23a1251efef 100644 --- a/commands/docs/cp.md +++ b/commands/docs/cp.md @@ -2,7 +2,7 @@ title: cp categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Copy files using uutils/coreutils cp. usage: | @@ -46,7 +46,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Copy myfile to dir_b diff --git a/commands/docs/date.md b/commands/docs/date.md index a13126d6ef0..5c511878bf9 100644 --- a/commands/docs/date.md +++ b/commands/docs/date.md @@ -2,7 +2,7 @@ title: date categories: | date -version: 0.103.0 +version: 0.104.0 date: | Date-related commands. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. @@ -35,6 +34,7 @@ You must use one of the following subcommands. Using this command as-is will onl | name | description | type | | ------------------------------------------------------------ | --------------------------------------------------------- | -------- | | [`date format`](/commands/docs/date_format.md) | Removed command: use `format date` instead. | built-in | +| [`date from-human`](/commands/docs/date_from-human.md) | Convert a human readable datetime string to a datetime. | built-in | | [`date humanize`](/commands/docs/date_humanize.md) | Print a 'humanized' format for the date, relative to now. | built-in | | [`date list-timezone`](/commands/docs/date_list-timezone.md) | List supported time zones. | built-in | | [`date now`](/commands/docs/date_now.md) | Get the current date. | built-in | diff --git a/commands/docs/date_format.md b/commands/docs/date_format.md index d093628367c..9ca5f254aed 100644 --- a/commands/docs/date_format.md +++ b/commands/docs/date_format.md @@ -2,7 +2,7 @@ title: date format categories: | removed -version: 0.103.0 +version: 0.104.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 new file mode 100644 index 00000000000..8adcfcb6c8f --- /dev/null +++ b/commands/docs/date_from-human.md @@ -0,0 +1,58 @@ +--- +title: date from-human +categories: | + date +version: 0.104.0 +date: | + Convert a human readable datetime string to a datetime. +usage: | + Convert a human readable datetime string to a datetime. +editLink: false +contributors: false +--- + + +# `date from-human` for [date](/commands/categories/date.md) + +
Convert a human readable datetime string to a datetime.
+ +## Signature + +```> date from-human {flags} ``` + +## Flags + + - `--list, -l`: Show human-readable datetime parsing examples + + +## Input/output types: + +| input | output | +| ------- | -------- | +| nothing | table | +| string | datetime | +## Examples + +Parsing human readable datetime +```nu +> 'Today at 18:30' | date from-human + +``` + +Parsing human readable datetime +```nu +> 'Last Friday at 19:45' | date from-human + +``` + +Parsing human readable datetime +```nu +> 'In 5 minutes and 30 seconds' | date from-human + +``` + +PShow human-readable datetime parsing examples +```nu +> date from-human --list + +``` diff --git a/commands/docs/date_humanize.md b/commands/docs/date_humanize.md index 31047d35825..f215092fdd6 100644 --- a/commands/docs/date_humanize.md +++ b/commands/docs/date_humanize.md @@ -2,7 +2,7 @@ title: date humanize categories: | date -version: 0.103.0 +version: 0.104.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 d6e3bfed4dc..b29a9248f92 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.103.0 +version: 0.104.0 date: | List supported time zones. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show time zone(s) that contains 'Shanghai' diff --git a/commands/docs/date_now.md b/commands/docs/date_now.md index 16248eaf8d4..4874205ce31 100644 --- a/commands/docs/date_now.md +++ b/commands/docs/date_now.md @@ -2,7 +2,7 @@ title: date now categories: | date -version: 0.103.0 +version: 0.104.0 date: | Get the current date. usage: | @@ -26,15 +26,20 @@ contributors: false | input | output | | ------- | -------- | | nothing | datetime | - ## Examples -Get the current date and display it in a given format string. +Get the current date and format it in a given format string. ```nu > date now | format date "%Y-%m-%d %H:%M:%S" ``` +Get the current date and format it according to the RFC 3339 standard. +```nu +> date now | format date "%+" + +``` + Get the time duration since 2019-04-30. ```nu > (date now) - 2019-05-01 @@ -47,7 +52,7 @@ Get the time duration since a more specific time. ``` -Get current time in full RFC 3339 format with time zone. +Get current time and format it in the debug format (RFC 2822 with timezone) ```nu > date now | debug diff --git a/commands/docs/date_to-timezone.md b/commands/docs/date_to-timezone.md index a3db159b68f..64d5d0e6122 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.103.0 +version: 0.104.0 date: | Convert a date to a given time zone. usage: | diff --git a/commands/docs/debug.md b/commands/docs/debug.md index fc5a05555f9..09d40e2fee9 100644 --- a/commands/docs/debug.md +++ b/commands/docs/debug.md @@ -2,7 +2,7 @@ title: debug categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Debug print the value(s) piped in. usage: | @@ -23,6 +23,7 @@ contributors: false ## Flags - `--raw, -r`: Prints the raw value representation + - `--raw-value, -v`: Prints the raw value representation but not the nushell value part ## Input/output types: @@ -59,6 +60,12 @@ Debug print a table ``` +Debug print an ansi escape encoded string and get the raw value +```nu +> $'(ansi red)nushell(ansi reset)' | debug -v +"\u{1b}[31mnushell\u{1b}[0m" +``` + ## Subcommands: diff --git a/commands/docs/debug_info.md b/commands/docs/debug_info.md index a5da4c39a79..6ba46ecec1f 100644 --- a/commands/docs/debug_info.md +++ b/commands/docs/debug_info.md @@ -2,7 +2,7 @@ title: debug info categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View process memory info. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples View process information diff --git a/commands/docs/debug_profile.md b/commands/docs/debug_profile.md index 60935203a51..a844916753a 100644 --- a/commands/docs/debug_profile.md +++ b/commands/docs/debug_profile.md @@ -2,7 +2,7 @@ title: debug profile categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Profile pipeline elements in a closure. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ----- | ------ | | any | table | - ## Examples Profile config evaluation diff --git a/commands/docs/decode.md b/commands/docs/decode.md index 1c20e512faf..177705d34f8 100644 --- a/commands/docs/decode.md +++ b/commands/docs/decode.md @@ -2,7 +2,7 @@ title: decode categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Decode bytes into a string. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | binary | string | - ## Examples Decode the output of an external command diff --git a/commands/docs/decode_base32.md b/commands/docs/decode_base32.md index e6acc354950..4a2e6bf080e 100644 --- a/commands/docs/decode_base32.md +++ b/commands/docs/decode_base32.md @@ -2,7 +2,7 @@ title: decode base32 categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Decode a Base32 value. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | string | binary | - ## Examples Decode arbitrary binary data diff --git a/commands/docs/decode_base32hex.md b/commands/docs/decode_base32hex.md index a4ffe3e2453..8cd4aa81521 100644 --- a/commands/docs/decode_base32hex.md +++ b/commands/docs/decode_base32hex.md @@ -2,7 +2,7 @@ title: decode base32hex categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Encode a base32hex value. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | string | binary | - ## Examples Decode arbitrary binary data diff --git a/commands/docs/decode_base64.md b/commands/docs/decode_base64.md index f4428e46995..ea7247e9d79 100644 --- a/commands/docs/decode_base64.md +++ b/commands/docs/decode_base64.md @@ -2,7 +2,7 @@ title: decode base64 categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Decode a Base64 value. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------ | ------ | | string | binary | - ## Examples Decode a Base64 string diff --git a/commands/docs/decode_hex.md b/commands/docs/decode_hex.md index 456000bf8fb..a62251be0a1 100644 --- a/commands/docs/decode_hex.md +++ b/commands/docs/decode_hex.md @@ -2,7 +2,7 @@ title: decode hex categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Hex decode a value. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | binary | - ## Examples Decode arbitrary binary data diff --git a/commands/docs/def.md b/commands/docs/def.md index fac23538252..b6fca256668 100644 --- a/commands/docs/def.md +++ b/commands/docs/def.md @@ -2,7 +2,7 @@ title: def categories: | core -version: 0.103.0 +version: 0.104.0 core: | Define a custom command. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Define a command and run it diff --git a/commands/docs/default.md b/commands/docs/default.md index 9fa7f83b9d8..34e613f8994 100644 --- a/commands/docs/default.md +++ b/commands/docs/default.md @@ -2,7 +2,7 @@ title: default categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Sets a default value if a row's column is missing or null. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Give a default 'target' column to all file entries diff --git a/commands/docs/describe.md b/commands/docs/describe.md index ed74aecd472..c7a80c79bd9 100644 --- a/commands/docs/describe.md +++ b/commands/docs/describe.md @@ -2,7 +2,7 @@ title: describe categories: | core -version: 0.103.0 +version: 0.104.0 core: | Describe the type and structure of the value(s) piped in. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Describe the type of a string @@ -43,42 +42,91 @@ string Describe the type of a record in a detailed way ```nu > {shell:'true', uwu:true, features: {bugs:false, multiplatform:true, speed: 10}, fib: [1 1 2 3 5 8], on_save: {|x| $'Saving ($x)'}, first_commit: 2019-05-10, my_duration: (4min + 20sec)} | describe -d -╭─────────┬───────────────────────────────────────────────────────────╮ -│ type │ record │ -│ │ ╭──────────────┬────────────────────────────────────────╮ │ -│ columns │ │ shell │ string │ │ -│ │ │ uwu │ bool │ │ -│ │ │ │ ╭─────────┬──────────────────────────╮ │ │ -│ │ │ features │ │ type │ record │ │ │ -│ │ │ │ │ │ ╭───────────────┬──────╮ │ │ │ -│ │ │ │ │ columns │ │ bugs │ bool │ │ │ │ -│ │ │ │ │ │ │ multiplatform │ bool │ │ │ │ -│ │ │ │ │ │ │ speed │ int │ │ │ │ -│ │ │ │ │ │ ╰───────────────┴──────╯ │ │ │ -│ │ │ │ ╰─────────┴──────────────────────────╯ │ │ -│ │ │ │ ╭────────┬─────────────╮ │ │ -│ │ │ fib │ │ type │ list │ │ │ -│ │ │ │ │ length │ 6 │ │ │ -│ │ │ │ │ │ ╭───┬─────╮ │ │ │ -│ │ │ │ │ values │ │ 0 │ int │ │ │ │ -│ │ │ │ │ │ │ 1 │ int │ │ │ │ -│ │ │ │ │ │ │ 2 │ int │ │ │ │ -│ │ │ │ │ │ │ 3 │ int │ │ │ │ -│ │ │ │ │ │ │ 4 │ int │ │ │ │ -│ │ │ │ │ │ │ 5 │ int │ │ │ │ -│ │ │ │ │ │ ╰───┴─────╯ │ │ │ -│ │ │ │ ╰────────┴─────────────╯ │ │ -│ │ │ │ ╭───────────┬────────────────────────╮ │ │ -│ │ │ on_save │ │ type │ closure │ │ │ -│ │ │ │ │ │ ╭──────────┬─────────╮ │ │ │ -│ │ │ │ │ signature │ │ name │ │ │ │ │ -│ │ │ │ │ │ │ category │ default │ │ │ │ -│ │ │ │ │ │ ╰──────────┴─────────╯ │ │ │ -│ │ │ │ ╰───────────┴────────────────────────╯ │ │ -│ │ │ first_commit │ date │ │ -│ │ │ my_duration │ duration │ │ -│ │ ╰──────────────┴────────────────────────────────────────╯ │ -╰─────────┴───────────────────────────────────────────────────────────╯ +╭───────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ type │ record │ +│ detailed_type │ record, │ +│ │ fib: list, on_save: closure, first_commit: datetime, my_duration: duration> │ +│ │ ╭──────────────┬──────────────────────────────────────────────────────────────────────────────────╮ │ +│ columns │ │ │ ╭───────────────┬────────────────────────╮ │ │ +│ │ │ shell │ │ type │ string │ │ │ +│ │ │ │ │ detailed_type │ string │ │ │ +│ │ │ │ │ rust_type │ &alloc::string::String │ │ │ +│ │ │ │ │ value │ true │ │ │ +│ │ │ │ ╰───────────────┴────────────────────────╯ │ │ +│ │ │ │ ╭───────────────┬──────╮ │ │ +│ │ │ uwu │ │ type │ bool │ │ │ +│ │ │ │ │ detailed_type │ bool │ │ │ +│ │ │ │ │ rust_type │ bool │ │ │ +│ │ │ │ │ value │ true │ │ │ +│ │ │ │ ╰───────────────┴──────╯ │ │ +│ │ │ │ ╭───────────────┬──────────────────────────────────────────────────────────────╮ │ │ +│ │ │ features │ │ type │ record │ │ │ +│ │ │ │ │ detailed_type │ record │ │ │ +│ │ │ │ │ │ ╭───────────────┬───────────────────────────╮ │ │ │ +│ │ │ │ │ columns │ │ │ ╭───────────────┬───────╮ │ │ │ │ +│ │ │ │ │ │ │ bugs │ │ type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ detailed_type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ rust_type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ value │ false │ │ │ │ │ +│ │ │ │ │ │ │ │ ╰───────────────┴───────╯ │ │ │ │ +│ │ │ │ │ │ │ │ ╭───────────────┬──────╮ │ │ │ │ +│ │ │ │ │ │ │ multiplatform │ │ type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ detailed_type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ rust_type │ bool │ │ │ │ │ +│ │ │ │ │ │ │ │ │ value │ true │ │ │ │ │ +│ │ │ │ │ │ │ │ ╰───────────────┴──────╯ │ │ │ │ +│ │ │ │ │ │ │ │ ╭───────────────┬─────╮ │ │ │ │ +│ │ │ │ │ │ │ speed │ │ type │ int │ │ │ │ │ +│ │ │ │ │ │ │ │ │ detailed_type │ int │ │ │ │ │ +│ │ │ │ │ │ │ │ │ rust_type │ i64 │ │ │ │ │ +│ │ │ │ │ │ │ │ │ value │ 10 │ │ │ │ │ +│ │ │ │ │ │ │ │ ╰───────────────┴─────╯ │ │ │ │ +│ │ │ │ │ │ ╰───────────────┴───────────────────────────╯ │ │ │ +│ │ │ │ │ rust_type │ &nu_utils::shared_cow::SharedCow │ │ │ +│ │ │ │ ╰───────────────┴──────────────────────────────────────────────────────────────╯ │ │ +│ │ │ │ ╭─────────────────────┬────────────────────────────────────────────────────────╮ │ │ +│ │ │ fib │ │ type │ list │ │ │ +│ │ │ │ │ detailed_type │ list │ │ │ +│ │ │ │ │ length │ 6 │ │ │ +│ │ │ │ │ rust_type │ &mut alloc::vec::Vec │ │ │ +│ │ │ │ │ │ ╭───┬──────┬───────────────┬───────────┬───────╮ │ │ │ +│ │ │ │ │ value │ │ # │ type │ detailed_type │ rust_type │ value │ │ │ │ +│ │ │ │ │ │ ├───┼──────┼───────────────┼───────────┼───────┤ │ │ │ +│ │ │ │ │ │ │ 0 │ int │ int │ i64 │ 1 │ │ │ │ +│ │ │ │ │ │ │ 1 │ int │ int │ i64 │ 1 │ │ │ │ +│ │ │ │ │ │ │ 2 │ int │ int │ i64 │ 2 │ │ │ │ +│ │ │ │ │ │ │ 3 │ int │ int │ i64 │ 3 │ │ │ │ +│ │ │ │ │ │ │ 4 │ int │ int │ i64 │ 5 │ │ │ │ +│ │ │ │ │ │ │ 5 │ int │ int │ i64 │ 8 │ │ │ │ +│ │ │ │ │ │ ╰───┴──────┴───────────────┴───────────┴───────╯ │ │ │ +│ │ │ │ ╰─────────────────────┴────────────────────────────────────────────────────────╯ │ │ +│ │ │ │ ╭─────────────────┬────────────────────────────────────────────────────────────╮ │ │ +│ │ │ on_save │ │ type │ closure │ │ │ +│ │ │ │ │ detailed_type │ closure │ │ │ +│ │ │ │ │ rust_type │ &alloc::boxed::Box │ │ │ +│ │ │ │ │ value │ closure_1 │ │ │ +│ │ │ │ │ │ ╭──────────┬─────────╮ │ │ │ +│ │ │ │ │ signature │ │ name │ │ │ │ │ +│ │ │ │ │ │ │ category │ default │ │ │ │ +│ │ │ │ │ │ ╰──────────┴─────────╯ │ │ │ +│ │ │ │ ╰─────────────────┴────────────────────────────────────────────────────────────╯ │ │ +│ │ │ │ ╭───────────────┬──────────────────────────────────────────────────────────────╮ │ │ +│ │ │ first_commit │ │ type │ datetime │ │ │ +│ │ │ │ │ detailed_type │ datetime │ │ │ +│ │ │ │ │ rust_type │ chrono::datetime::DateTime │ │ │ +│ │ │ │ │ value │ 5 years ago │ │ │ +│ │ │ │ ╰───────────────┴──────────────────────────────────────────────────────────────╯ │ │ +│ │ │ │ ╭───────────────┬────────────╮ │ │ +│ │ │ my_duration │ │ type │ duration │ │ │ +│ │ │ │ │ detailed_type │ duration │ │ │ +│ │ │ │ │ rust_type │ i64 │ │ │ +│ │ │ │ │ value │ 4min 20sec │ │ │ +│ │ │ │ ╰───────────────┴────────────╯ │ │ +│ │ ╰──────────────┴──────────────────────────────────────────────────────────────────────────────────╯ │ +│ rust_type │ &nu_utils::shared_cow::SharedCow │ +╰───────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` Describe the type of a stream with detailed information diff --git a/commands/docs/detect_columns.md b/commands/docs/detect_columns.md index 36a648a6614..fb5a4386e76 100644 --- a/commands/docs/detect_columns.md +++ b/commands/docs/detect_columns.md @@ -2,7 +2,7 @@ title: detect columns categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Attempt to automatically split text into multiple columns. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | ------ | ------ | | string | table | - ## Examples use --guess if you find default algorithm not working diff --git a/commands/docs/do.md b/commands/docs/do.md index 12f52c0219d..f4ff4a0b87f 100644 --- a/commands/docs/do.md +++ b/commands/docs/do.md @@ -2,7 +2,7 @@ title: do categories: | core -version: 0.103.0 +version: 0.104.0 core: | Run a closure, providing it with the pipeline input. usage: | @@ -23,8 +23,6 @@ contributors: false ## Flags - `--ignore-errors, -i`: ignore errors as the closure runs - - `--ignore-shell-errors, -s`: ignore shell errors as the closure runs - - `--ignore-program-errors, -p`: ignore external program errors as the closure runs - `--capture-errors, -c`: catch errors as the closure runs, and return them - `--env`: keep the environment defined inside the command @@ -39,7 +37,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Run the closure diff --git a/commands/docs/drop.md b/commands/docs/drop.md index dcb2ef11105..0ac08c5b847 100644 --- a/commands/docs/drop.md +++ b/commands/docs/drop.md @@ -2,7 +2,7 @@ title: drop categories: | filters -version: 0.103.0 +version: 0.104.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 04919dfa663..4fe95c43cfa 100644 --- a/commands/docs/drop_column.md +++ b/commands/docs/drop_column.md @@ -2,7 +2,7 @@ title: drop column categories: | filters -version: 0.103.0 +version: 0.104.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 94378d0ce06..4a58fbad2cb 100644 --- a/commands/docs/drop_nth.md +++ b/commands/docs/drop_nth.md @@ -2,7 +2,7 @@ title: drop nth categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Drop the selected rows. usage: | diff --git a/commands/docs/du.md b/commands/docs/du.md index 670f5f6f7bc..bcb2f7f25d1 100644 --- a/commands/docs/du.md +++ b/commands/docs/du.md @@ -2,7 +2,7 @@ title: du categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Find disk usage sizes of specified items. usage: | @@ -38,7 +38,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Disk usage of the current directory diff --git a/commands/docs/each.md b/commands/docs/each.md index a49d475ef34..273fa041616 100644 --- a/commands/docs/each.md +++ b/commands/docs/each.md @@ -2,7 +2,7 @@ title: each categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Run a closure on each row of the input list, creating a new list with the results. usage: | @@ -103,4 +103,4 @@ with 'transpose' first. | name | description | type | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------- | -| [`each while`](/commands/docs/each_while.md) | Run a closure on each row of the input list until a null is found, then create a new list with the results. | built-in | +| [`each while`](/commands/docs/each_while.md) | Run a closure on each row of the input list until a null is found, then create a new list with the results. | built-in | \ No newline at end of file diff --git a/commands/docs/each_while.md b/commands/docs/each_while.md index 06d094e513c..6611bf4a513 100644 --- a/commands/docs/each_while.md +++ b/commands/docs/each_while.md @@ -2,7 +2,7 @@ title: each while categories: | filters -version: 0.103.0 +version: 0.104.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: | @@ -30,7 +30,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Produces a list of each element before the 3, doubled diff --git a/commands/docs/echo.md b/commands/docs/echo.md index 4111b5637f5..fb569d65c6d 100644 --- a/commands/docs/echo.md +++ b/commands/docs/echo.md @@ -2,7 +2,7 @@ title: echo categories: | core -version: 0.103.0 +version: 0.104.0 core: | Returns its arguments, ignoring the piped-in value. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Put a list of numbers in the pipeline. This is the same as [1 2 3]. diff --git a/commands/docs/encode.md b/commands/docs/encode.md index 6deed969c52..3305f67e51d 100644 --- a/commands/docs/encode.md +++ b/commands/docs/encode.md @@ -2,7 +2,7 @@ title: encode categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Encode a string into bytes. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------ | ------ | | string | binary | - ## Examples Encode an UTF-8 string into Shift-JIS diff --git a/commands/docs/encode_base32.md b/commands/docs/encode_base32.md index 1aaf908de5f..c62e6950ae7 100644 --- a/commands/docs/encode_base32.md +++ b/commands/docs/encode_base32.md @@ -2,7 +2,7 @@ title: encode base32 categories: | formats -version: 0.103.0 +version: 0.104.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 3c785149037..fcbe3a3ec18 100644 --- a/commands/docs/encode_base32hex.md +++ b/commands/docs/encode_base32hex.md @@ -2,7 +2,7 @@ title: encode base32hex categories: | formats -version: 0.103.0 +version: 0.104.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 a8333594403..dc733567bfc 100644 --- a/commands/docs/encode_base64.md +++ b/commands/docs/encode_base64.md @@ -2,7 +2,7 @@ title: encode base64 categories: | formats -version: 0.103.0 +version: 0.104.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 38d41083d2b..0d916f3dac0 100644 --- a/commands/docs/encode_hex.md +++ b/commands/docs/encode_hex.md @@ -2,7 +2,7 @@ title: encode hex categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Hex encode a binary value or a string. usage: | diff --git a/commands/docs/enumerate.md b/commands/docs/enumerate.md index adbc7ad37d0..7a192757d66 100644 --- a/commands/docs/enumerate.md +++ b/commands/docs/enumerate.md @@ -2,7 +2,7 @@ title: enumerate categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Enumerate the elements in a stream. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------ | | any | table | - ## Examples Add an index to each element of a list diff --git a/commands/docs/error_make.md b/commands/docs/error_make.md index 49be5619c0e..c5e707a8e33 100644 --- a/commands/docs/error_make.md +++ b/commands/docs/error_make.md @@ -2,7 +2,7 @@ title: error make categories: | core -version: 0.103.0 +version: 0.104.0 core: | Create an error. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Create a simple custom error diff --git a/commands/docs/every.md b/commands/docs/every.md index be3257bcde8..7b7757f72fe 100644 --- a/commands/docs/every.md +++ b/commands/docs/every.md @@ -2,7 +2,7 @@ title: every categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Show (or skip) every n-th row, starting from the first one. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Get every second row diff --git a/commands/docs/exec.md b/commands/docs/exec.md index aa206d7977b..8add578e0cf 100644 --- a/commands/docs/exec.md +++ b/commands/docs/exec.md @@ -2,7 +2,7 @@ title: exec categories: | system -version: 0.103.0 +version: 0.104.0 system: | Execute a command, replacing or exiting the current process, depending on platform. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Execute external 'ps aux' tool diff --git a/commands/docs/exit.md b/commands/docs/exit.md index 8f4ffb02006..50084c19933 100644 --- a/commands/docs/exit.md +++ b/commands/docs/exit.md @@ -2,7 +2,7 @@ title: exit categories: | shells -version: 0.103.0 +version: 0.104.0 shells: | Exit Nu. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Exit the current shell diff --git a/commands/docs/explain.md b/commands/docs/explain.md index 1fd5842ed7e..a5e461d0178 100644 --- a/commands/docs/explain.md +++ b/commands/docs/explain.md @@ -2,7 +2,7 @@ title: explain categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Explain closure contents. usage: | diff --git a/commands/docs/explore.md b/commands/docs/explore.md index 116e3b0bfa7..049f2d29a06 100644 --- a/commands/docs/explore.md +++ b/commands/docs/explore.md @@ -2,7 +2,7 @@ title: explore categories: | viewers -version: 0.103.0 +version: 0.104.0 viewers: | Explore acts as a table pager, just like `less` does for text. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Explore the system host information record diff --git a/commands/docs/export-env.md b/commands/docs/export-env.md index 828bba27db9..e505660a2e0 100644 --- a/commands/docs/export-env.md +++ b/commands/docs/export-env.md @@ -2,7 +2,7 @@ title: export-env categories: | env -version: 0.103.0 +version: 0.104.0 env: | Run a block and preserve its environment in a current scope. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Set an environment variable diff --git a/commands/docs/export.md b/commands/docs/export.md index 2b042cd6440..5d10b612d3c 100644 --- a/commands/docs/export.md +++ b/commands/docs/export.md @@ -2,7 +2,7 @@ title: export categories: | core -version: 0.103.0 +version: 0.104.0 core: | Export definitions or environment variables from a module. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Export a definition from a module diff --git a/commands/docs/export_alias.md b/commands/docs/export_alias.md index eb68b9a207a..4ac0458c588 100644 --- a/commands/docs/export_alias.md +++ b/commands/docs/export_alias.md @@ -2,7 +2,7 @@ title: export alias categories: | core -version: 0.103.0 +version: 0.104.0 core: | Alias a command (with optional flags) to a new name and export it from a module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Alias ll to ls -l and export it from a module diff --git a/commands/docs/export_const.md b/commands/docs/export_const.md index af458c13df1..a1ffe25118a 100644 --- a/commands/docs/export_const.md +++ b/commands/docs/export_const.md @@ -2,7 +2,7 @@ title: export const categories: | core -version: 0.103.0 +version: 0.104.0 core: | Use parse-time constant from a module and export them from this module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Re-export a command from another module diff --git a/commands/docs/export_def.md b/commands/docs/export_def.md index 8150623148c..2a87a995693 100644 --- a/commands/docs/export_def.md +++ b/commands/docs/export_def.md @@ -2,7 +2,7 @@ title: export def categories: | core -version: 0.103.0 +version: 0.104.0 core: | Define a custom command and export it from a module. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Define a custom command in a module and call it diff --git a/commands/docs/export_extern.md b/commands/docs/export_extern.md index 964f3042f90..9bdd2c7b83b 100644 --- a/commands/docs/export_extern.md +++ b/commands/docs/export_extern.md @@ -2,7 +2,7 @@ title: export extern categories: | core -version: 0.103.0 +version: 0.104.0 core: | Define an extern and export it from a module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Export the signature for an external command diff --git a/commands/docs/export_module.md b/commands/docs/export_module.md index 0d8efd45925..eb21cbc72e3 100644 --- a/commands/docs/export_module.md +++ b/commands/docs/export_module.md @@ -2,7 +2,7 @@ title: export module categories: | core -version: 0.103.0 +version: 0.104.0 core: | Export a custom module from a module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Define a custom command in a submodule of a module and call it diff --git a/commands/docs/export_use.md b/commands/docs/export_use.md index 2f3dac4bcd0..89236adcb0b 100644 --- a/commands/docs/export_use.md +++ b/commands/docs/export_use.md @@ -2,7 +2,7 @@ title: export use categories: | core -version: 0.103.0 +version: 0.104.0 core: | Use definitions from a module and export them from this module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Re-export a command from another module diff --git a/commands/docs/extern.md b/commands/docs/extern.md index 5c9dba58c73..08016984939 100644 --- a/commands/docs/extern.md +++ b/commands/docs/extern.md @@ -2,7 +2,7 @@ title: extern categories: | core -version: 0.103.0 +version: 0.104.0 core: | Define a signature for an external command. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Write a signature for an external command diff --git a/commands/docs/fill.md b/commands/docs/fill.md index 5b08833b9ab..2df6ed720b3 100644 --- a/commands/docs/fill.md +++ b/commands/docs/fill.md @@ -2,7 +2,7 @@ title: fill categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Fill and Align. usage: | diff --git a/commands/docs/filter.md b/commands/docs/filter.md index b91d947ef90..b5b1d71bf17 100644 --- a/commands/docs/filter.md +++ b/commands/docs/filter.md @@ -2,7 +2,7 @@ title: filter categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Filter values based on a predicate closure. usage: | diff --git a/commands/docs/find.md b/commands/docs/find.md index 54e9e387425..9f2bf2c283e 100644 --- a/commands/docs/find.md +++ b/commands/docs/find.md @@ -2,7 +2,7 @@ title: find categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Searches terms in the input. usage: | diff --git a/commands/docs/first.md b/commands/docs/first.md index 7691e47852b..20a768e2677 100644 --- a/commands/docs/first.md +++ b/commands/docs/first.md @@ -2,7 +2,7 @@ title: first categories: | filters -version: 0.103.0 +version: 0.104.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 672307f800c..dc8d8da2edf 100644 --- a/commands/docs/flatten.md +++ b/commands/docs/flatten.md @@ -2,7 +2,7 @@ title: flatten categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Flatten the table. usage: | diff --git a/commands/docs/for.md b/commands/docs/for.md index e19e7746e0b..99327091e4b 100644 --- a/commands/docs/for.md +++ b/commands/docs/for.md @@ -2,7 +2,7 @@ title: for categories: | core -version: 0.103.0 +version: 0.104.0 core: | Loop over a range. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Print the square of each integer diff --git a/commands/docs/format.md b/commands/docs/format.md index 863d4094a5b..3397e6c914d 100644 --- a/commands/docs/format.md +++ b/commands/docs/format.md @@ -2,7 +2,7 @@ title: format categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Various commands for formatting data. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/format_bits.md b/commands/docs/format_bits.md index f84926f1748..46d026e6dbe 100644 --- a/commands/docs/format_bits.md +++ b/commands/docs/format_bits.md @@ -2,7 +2,7 @@ title: format bits categories: | conversions -version: 0.103.0 +version: 0.104.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 6ac89c74544..736059e3f97 100644 --- a/commands/docs/format_date.md +++ b/commands/docs/format_date.md @@ -2,7 +2,7 @@ title: format date categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Format a given date using a format string. usage: | @@ -51,6 +51,12 @@ Format a given date-time as a string using the default format (RFC 2822). Fri, 22 Oct 2021 20:00:12 +0100 ``` +Format a given date-time according to the RFC 3339 standard. +```nu +> '2021-10-22 20:00:12 +01:00' | into datetime | format date "%+" +2021-10-22T20:00:12+01:00 +``` + Format the current date-time using a given format string. ```nu > date now | format date "%Y-%m-%d %H:%M:%S" diff --git a/commands/docs/format_duration.md b/commands/docs/format_duration.md index 9a894739d80..8acc98f8a7e 100644 --- a/commands/docs/format_duration.md +++ b/commands/docs/format_duration.md @@ -2,7 +2,7 @@ title: format duration categories: | strings -version: 0.103.0 +version: 0.104.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 2327fd93016..5e4b5afe31f 100644 --- a/commands/docs/format_filesize.md +++ b/commands/docs/format_filesize.md @@ -2,7 +2,7 @@ title: format filesize categories: | strings -version: 0.103.0 +version: 0.104.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 ebdb48d6a55..fad219747b0 100644 --- a/commands/docs/format_number.md +++ b/commands/docs/format_number.md @@ -2,7 +2,7 @@ title: format number categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Format a number. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | number | record | - ## Examples Get a record containing multiple formats for the number 42 diff --git a/commands/docs/format_pattern.md b/commands/docs/format_pattern.md index b217e5ef9f4..ef6e8c4fb53 100644 --- a/commands/docs/format_pattern.md +++ b/commands/docs/format_pattern.md @@ -2,7 +2,7 @@ title: format pattern categories: | strings -version: 0.103.0 +version: 0.104.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 94e0c5b3c80..0b385d2320f 100644 --- a/commands/docs/from.md +++ b/commands/docs/from.md @@ -2,7 +2,7 @@ title: from categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse a string or binary data into structured data. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/from_csv.md b/commands/docs/from_csv.md index dbdd9f112e8..bbb4d474064 100644 --- a/commands/docs/from_csv.md +++ b/commands/docs/from_csv.md @@ -2,7 +2,7 @@ title: from csv categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .csv and create table. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------ | ------ | | string | table | - ## Examples Convert comma-separated data to a table diff --git a/commands/docs/from_eml.md b/commands/docs/from_eml.md index f039e17e856..66b3180e1c9 100644 --- a/commands/docs/from_eml.md +++ b/commands/docs/from_eml.md @@ -2,7 +2,7 @@ title: from eml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .eml and create record. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------ | ------ | | string | record | - ## Examples Convert eml structured data into record diff --git a/commands/docs/from_ics.md b/commands/docs/from_ics.md index aa29be49180..6408e854c93 100644 --- a/commands/docs/from_ics.md +++ b/commands/docs/from_ics.md @@ -2,7 +2,7 @@ title: from ics categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .ics and create table. usage: | @@ -33,17 +33,17 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------ | ------ | | string | table | - ## Examples Converts ics formatted string to table ```nu > 'BEGIN:VCALENDAR END:VCALENDAR' | from ics -╭───┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────╮ -│ # │ properties │ events │ alarms │ to-Dos │ journals │ free-busys │ timezones │ -├───┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┤ -│ 0 │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ -╰───┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────╯ +╭───┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────╮ +│ # │ properties │ events │ alarms │ to-Dos │ journals │ free-busys │ timezones │ +├───┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼───────────┤ +│ 0 │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 items] │ [list 0 │ +│ │ │ │ │ │ │ │ items] │ +╰───┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────╯ ``` diff --git a/commands/docs/from_ini.md b/commands/docs/from_ini.md index 225b10ce0cf..43f6fb5716e 100644 --- a/commands/docs/from_ini.md +++ b/commands/docs/from_ini.md @@ -2,7 +2,7 @@ title: from ini categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .ini and create table. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------ | ------ | | string | record | - ## Examples Converts ini formatted string to record diff --git a/commands/docs/from_json.md b/commands/docs/from_json.md index 90ca1de021f..e53d8b18395 100644 --- a/commands/docs/from_json.md +++ b/commands/docs/from_json.md @@ -2,7 +2,7 @@ title: from json categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert from json to structured data. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------ | ------ | | string | any | - ## Examples Converts json formatted string to table diff --git a/commands/docs/from_msgpack.md b/commands/docs/from_msgpack.md index 4d2edfae626..05e8e3a8a65 100644 --- a/commands/docs/from_msgpack.md +++ b/commands/docs/from_msgpack.md @@ -2,7 +2,7 @@ title: from msgpack categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert MessagePack data into Nu values. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | binary | any | - ## Examples Read a list of values from MessagePack diff --git a/commands/docs/from_msgpackz.md b/commands/docs/from_msgpackz.md index 95326bdebeb..48f9d7e58cb 100644 --- a/commands/docs/from_msgpackz.md +++ b/commands/docs/from_msgpackz.md @@ -2,7 +2,7 @@ title: from msgpackz categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert brotli-compressed MessagePack data into Nu values. usage: | @@ -30,6 +30,5 @@ contributors: false | input | output | | ------ | ------ | | binary | any | - ## Notes This is the format used by the plugin registry file ($nu.plugin-path). \ No newline at end of file diff --git a/commands/docs/from_nuon.md b/commands/docs/from_nuon.md index 2d1b41b3431..1aa710a674e 100644 --- a/commands/docs/from_nuon.md +++ b/commands/docs/from_nuon.md @@ -2,7 +2,7 @@ title: from nuon categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert from nuon to structured data. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | any | - ## Examples Converts nuon formatted string to table diff --git a/commands/docs/from_ods.md b/commands/docs/from_ods.md index a7776dc12d9..41d7feb4cf7 100644 --- a/commands/docs/from_ods.md +++ b/commands/docs/from_ods.md @@ -2,7 +2,7 @@ title: from ods categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse OpenDocument Spreadsheet(.ods) data and create table. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | string | table | - ## Examples Convert binary .ods data to a table diff --git a/commands/docs/from_plist.md b/commands/docs/from_plist.md index e348d6ebe49..4fc26efadd4 100644 --- a/commands/docs/from_plist.md +++ b/commands/docs/from_plist.md @@ -2,7 +2,7 @@ title: from plist categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert plist to Nushell values usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Convert a table into a plist file diff --git a/commands/docs/from_ssv.md b/commands/docs/from_ssv.md index 773f31c657b..388f3fc383c 100644 --- a/commands/docs/from_ssv.md +++ b/commands/docs/from_ssv.md @@ -2,7 +2,7 @@ title: from ssv categories: | formats -version: 0.103.0 +version: 0.104.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: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------ | ------ | | string | table | - ## Examples Converts ssv formatted string to table diff --git a/commands/docs/from_toml.md b/commands/docs/from_toml.md index 14249967c1a..cc14f202b87 100644 --- a/commands/docs/from_toml.md +++ b/commands/docs/from_toml.md @@ -2,7 +2,7 @@ title: from toml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .toml and create record. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | record | - ## Examples Converts toml formatted string to record diff --git a/commands/docs/from_tsv.md b/commands/docs/from_tsv.md index 941ae216829..1c262aec2b4 100644 --- a/commands/docs/from_tsv.md +++ b/commands/docs/from_tsv.md @@ -2,7 +2,7 @@ title: from tsv categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .tsv and create table. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------ | ------ | | string | table | - ## Examples Convert tab-separated data to a table diff --git a/commands/docs/from_url.md b/commands/docs/from_url.md index 07d2804a1f4..6ed5416890a 100644 --- a/commands/docs/from_url.md +++ b/commands/docs/from_url.md @@ -2,7 +2,7 @@ title: from url categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse url-encoded string as a record. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | record | - ## Examples Convert url encoded string into a record diff --git a/commands/docs/from_vcf.md b/commands/docs/from_vcf.md index a2d1dd6f245..4f20fce7111 100644 --- a/commands/docs/from_vcf.md +++ b/commands/docs/from_vcf.md @@ -2,7 +2,7 @@ title: from vcf categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .vcf and create table. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------ | ------ | | string | table | - ## Examples Converts ics formatted string to table diff --git a/commands/docs/from_xlsx.md b/commands/docs/from_xlsx.md index 712585ca419..974597d16ad 100644 --- a/commands/docs/from_xlsx.md +++ b/commands/docs/from_xlsx.md @@ -2,7 +2,7 @@ title: from xlsx categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse binary Excel(.xlsx) data and create table. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | binary | table | - ## Examples Convert binary .xlsx data to a table diff --git a/commands/docs/from_xml.md b/commands/docs/from_xml.md index 17d1a502949..57c6a0c79c0 100644 --- a/commands/docs/from_xml.md +++ b/commands/docs/from_xml.md @@ -2,7 +2,7 @@ title: from xml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .xml and create record. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------ | ------ | | string | record | - ## Examples Converts xml formatted string to record diff --git a/commands/docs/from_yaml.md b/commands/docs/from_yaml.md index 1e5349f8e66..c5f98db70bb 100644 --- a/commands/docs/from_yaml.md +++ b/commands/docs/from_yaml.md @@ -2,7 +2,7 @@ title: from yaml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .yaml/.yml and create table. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | any | - ## Examples Converts yaml formatted string to table diff --git a/commands/docs/from_yml.md b/commands/docs/from_yml.md index a16633df210..db02dd6d283 100644 --- a/commands/docs/from_yml.md +++ b/commands/docs/from_yml.md @@ -2,7 +2,7 @@ title: from yml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Parse text as .yaml/.yml and create table. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | any | - ## Examples Converts yaml formatted string to table diff --git a/commands/docs/generate.md b/commands/docs/generate.md index 98b1f0896d6..6698de24e7c 100644 --- a/commands/docs/generate.md +++ b/commands/docs/generate.md @@ -2,7 +2,7 @@ title: generate categories: | generators -version: 0.103.0 +version: 0.104.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 1e4d61f58e3..935eec73d12 100644 --- a/commands/docs/get.md +++ b/commands/docs/get.md @@ -2,7 +2,7 @@ title: get categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Extract data using a cell path. usage: | diff --git a/commands/docs/glob.md b/commands/docs/glob.md index 0863ec98d4e..059750bbbf0 100644 --- a/commands/docs/glob.md +++ b/commands/docs/glob.md @@ -2,7 +2,7 @@ title: glob categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Creates a list of files and/or folders based on the glob pattern provided. usage: | @@ -26,6 +26,7 @@ contributors: false - `--no-dir, -D`: Whether to filter out directories from the returned paths - `--no-file, -F`: Whether to filter out files from the returned paths - `--no-symlink, -S`: Whether to filter out symlinks from the returned paths + - `--follow-symlinks, -l`: Whether to follow symbolic links to their targets - `--exclude, -e {list}`: Patterns to exclude from the search: `glob` will not walk the inside of directories matching the excluded patterns. ## Parameters @@ -38,7 +39,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples Search for *.rs files @@ -107,5 +107,11 @@ Search for all files that are not in the target nor .git directories ``` +Search for files following symbolic links to their targets +```nu +> glob "**/*.txt" --follow-symlinks + +``` + ## Notes 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 51888279596..2ce3213a56e 100644 --- a/commands/docs/grid.md +++ b/commands/docs/grid.md @@ -2,7 +2,7 @@ title: grid categories: | viewers -version: 0.103.0 +version: 0.104.0 viewers: | Renders the output to a textual terminal grid. usage: | diff --git a/commands/docs/group-by.md b/commands/docs/group-by.md index c744f27f572..c9681e8ff0d 100644 --- a/commands/docs/group-by.md +++ b/commands/docs/group-by.md @@ -2,7 +2,7 @@ title: group-by categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Splits a list or table into groups, and returns a record containing those groups. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | --------- | ------ | | list\ | any | - ## Examples Group items by the "type" column's values diff --git a/commands/docs/gstat.md b/commands/docs/gstat.md index a83530914b7..231792e526f 100644 --- a/commands/docs/gstat.md +++ b/commands/docs/gstat.md @@ -2,7 +2,7 @@ title: gstat categories: | prompt -version: 0.103.0 +version: 0.104.0 prompt: | Get the git status of a repo usage: | @@ -36,4 +36,4 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | -| any | any | +| any | any | \ No newline at end of file diff --git a/commands/docs/hash.md b/commands/docs/hash.md index 657582183a3..23d30b79342 100644 --- a/commands/docs/hash.md +++ b/commands/docs/hash.md @@ -2,7 +2,7 @@ title: hash categories: | hash -version: 0.103.0 +version: 0.104.0 hash: | Apply hash function. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/hash_md5.md b/commands/docs/hash_md5.md index 24350f15726..d153e4b510e 100644 --- a/commands/docs/hash_md5.md +++ b/commands/docs/hash_md5.md @@ -2,7 +2,7 @@ title: hash md5 categories: | hash -version: 0.103.0 +version: 0.104.0 hash: | Hash a value using the md5 hash algorithm. usage: | diff --git a/commands/docs/hash_sha256.md b/commands/docs/hash_sha256.md index 46ca1d56c2d..2ea1944a0f7 100644 --- a/commands/docs/hash_sha256.md +++ b/commands/docs/hash_sha256.md @@ -2,7 +2,7 @@ title: hash sha256 categories: | hash -version: 0.103.0 +version: 0.104.0 hash: | Hash a value using the sha256 hash algorithm. usage: | diff --git a/commands/docs/headers.md b/commands/docs/headers.md index 4fb8ef136e9..cd64c66820b 100644 --- a/commands/docs/headers.md +++ b/commands/docs/headers.md @@ -2,7 +2,7 @@ title: headers categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Use the first row of the table as column names. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Sets the column names for a table created by `split column` diff --git a/commands/docs/help.md b/commands/docs/help.md index d548da9c07a..db01ed4b586 100644 --- a/commands/docs/help.md +++ b/commands/docs/help.md @@ -2,7 +2,7 @@ title: help categories: | core -version: 0.103.0 +version: 0.104.0 core: | Display help information about different parts of Nushell. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples show help for single command, alias, or module diff --git a/commands/docs/help_aliases.md b/commands/docs/help_aliases.md index 814101e8330..2da6bd5dc83 100644 --- a/commands/docs/help_aliases.md +++ b/commands/docs/help_aliases.md @@ -2,7 +2,7 @@ title: help aliases categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell aliases. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples show all aliases diff --git a/commands/docs/help_commands.md b/commands/docs/help_commands.md index 07ede84fece..e83c9b2fcaf 100644 --- a/commands/docs/help_commands.md +++ b/commands/docs/help_commands.md @@ -2,7 +2,7 @@ title: help commands categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell commands. usage: | @@ -33,4 +33,4 @@ contributors: false | input | output | | ------- | ------ | -| nothing | table | +| nothing | table | \ No newline at end of file diff --git a/commands/docs/help_escapes.md b/commands/docs/help_escapes.md index 2112bafb16a..028038ac006 100644 --- a/commands/docs/help_escapes.md +++ b/commands/docs/help_escapes.md @@ -2,7 +2,7 @@ title: help escapes categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell string escapes. usage: | @@ -25,4 +25,4 @@ contributors: false | input | output | | ------- | ------ | -| nothing | table | +| nothing | table | \ No newline at end of file diff --git a/commands/docs/help_externs.md b/commands/docs/help_externs.md index e42c28e6b64..fb8c6a56025 100644 --- a/commands/docs/help_externs.md +++ b/commands/docs/help_externs.md @@ -2,7 +2,7 @@ title: help externs categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell externs. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples show all externs diff --git a/commands/docs/help_modules.md b/commands/docs/help_modules.md index 478bf26724c..fc4927a215b 100644 --- a/commands/docs/help_modules.md +++ b/commands/docs/help_modules.md @@ -2,7 +2,7 @@ title: help modules categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell modules. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples show all modules diff --git a/commands/docs/help_operators.md b/commands/docs/help_operators.md index f26b7816dd1..55e2ae74358 100644 --- a/commands/docs/help_operators.md +++ b/commands/docs/help_operators.md @@ -2,7 +2,7 @@ title: help operators categories: | core -version: 0.103.0 +version: 0.104.0 core: | Show help on nushell operators. usage: | @@ -25,4 +25,4 @@ contributors: false | input | output | | ------- | ------ | -| nothing | table | +| nothing | table | \ No newline at end of file diff --git a/commands/docs/help_pipe-and-redirect.md b/commands/docs/help_pipe-and-redirect.md index 2f3d6914804..9a4f5125efa 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.103.0 +version: 0.104.0 core: | Show help on nushell pipes and redirects. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Notes This command contains basic usage of pipe and redirect symbol, for more detail, check: https://www.nushell.sh/lang-guide/chapters/pipelines.html \ No newline at end of file diff --git a/commands/docs/hide-env.md b/commands/docs/hide-env.md index 7c252021ae8..35018d1a1fa 100644 --- a/commands/docs/hide-env.md +++ b/commands/docs/hide-env.md @@ -2,7 +2,7 @@ title: hide-env categories: | core -version: 0.103.0 +version: 0.104.0 core: | Hide environment variables in the current scope. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Hide an environment variable diff --git a/commands/docs/hide.md b/commands/docs/hide.md index 6ba638943b9..c811e59ff60 100644 --- a/commands/docs/hide.md +++ b/commands/docs/hide.md @@ -2,7 +2,7 @@ title: hide categories: | core -version: 0.103.0 +version: 0.104.0 core: | Hide definitions in the current scope. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Hide the alias just defined diff --git a/commands/docs/histogram.md b/commands/docs/histogram.md index 5e76e2a4a79..5754aff9d1d 100644 --- a/commands/docs/histogram.md +++ b/commands/docs/histogram.md @@ -2,7 +2,7 @@ title: histogram categories: | chart -version: 0.103.0 +version: 0.104.0 chart: | Creates a new table with a histogram based on the column name passed in. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | --------- | ------ | | list\ | table | - ## Examples Compute a histogram of file types @@ -53,12 +52,12 @@ Compute a histogram for the types of files, with frequency column named freq Compute a histogram for a list of numbers ```nu > [1 2 1] | histogram -╭───┬───────┬───────┬──────────┬────────────┬────────────────────────────────────────────────────────────────────╮ -│ # │ value │ count │ quantile │ percentage │ frequency │ -├───┼───────┼───────┼──────────┼────────────┼────────────────────────────────────────────────────────────────────┤ -│ 0 │ 1 │ 2 │ 0.67 │ 66.67% │ ****************************************************************** │ -│ 1 │ 2 │ 1 │ 0.33 │ 33.33% │ ********************************* │ -╰───┴───────┴───────┴──────────┴────────────┴────────────────────────────────────────────────────────────────────╯ +╭────┬────────┬────────┬───────────┬─────────────┬────────────────────────────────────────────────────────────────────╮ +│ # │ value │ count │ quantile │ percentage │ frequency │ +├────┼────────┼────────┼───────────┼─────────────┼────────────────────────────────────────────────────────────────────┤ +│ 0 │ 1 │ 2 │ 0.67 │ 66.67% │ ****************************************************************** │ +│ 1 │ 2 │ 1 │ 0.33 │ 33.33% │ ********************************* │ +╰────┴────────┴────────┴───────────┴─────────────┴────────────────────────────────────────────────────────────────────╯ ``` diff --git a/commands/docs/history.md b/commands/docs/history.md index 066ec4ec513..ebb67ef21aa 100644 --- a/commands/docs/history.md +++ b/commands/docs/history.md @@ -2,7 +2,7 @@ title: history categories: | history -version: 0.103.0 +version: 0.104.0 history: | Get the command history. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Get current history length diff --git a/commands/docs/history_import.md b/commands/docs/history_import.md index fefa739224a..80dd393b850 100644 --- a/commands/docs/history_import.md +++ b/commands/docs/history_import.md @@ -2,7 +2,7 @@ title: history import categories: | history -version: 0.103.0 +version: 0.104.0 history: | Import command line history. usage: | diff --git a/commands/docs/history_session.md b/commands/docs/history_session.md index 62ddfd2c555..a7913b7166e 100644 --- a/commands/docs/history_session.md +++ b/commands/docs/history_session.md @@ -2,7 +2,7 @@ title: history session categories: | history -version: 0.103.0 +version: 0.104.0 history: | Get the command history session. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | int | - ## Examples Get current history session diff --git a/commands/docs/http.md b/commands/docs/http.md index 3a951ffc2e9..8adf5b8177f 100644 --- a/commands/docs/http.md +++ b/commands/docs/http.md @@ -2,7 +2,7 @@ title: http categories: | network -version: 0.103.0 +version: 0.104.0 network: | Various commands for working with http methods. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/http_delete.md b/commands/docs/http_delete.md index d6fec9db25b..316309080fe 100644 --- a/commands/docs/http_delete.md +++ b/commands/docs/http_delete.md @@ -2,7 +2,7 @@ title: http delete categories: | network -version: 0.103.0 +version: 0.104.0 network: | Delete the specified resource. usage: | @@ -44,7 +44,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples http delete from example.com diff --git a/commands/docs/http_get.md b/commands/docs/http_get.md index b452c2064d7..efc416ec4d8 100644 --- a/commands/docs/http_get.md +++ b/commands/docs/http_get.md @@ -2,7 +2,7 @@ title: http get categories: | network -version: 0.103.0 +version: 0.104.0 network: | Fetch the contents from a URL. usage: | @@ -42,7 +42,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Get content from example.com diff --git a/commands/docs/http_head.md b/commands/docs/http_head.md index 6738e7168f7..452ca01998c 100644 --- a/commands/docs/http_head.md +++ b/commands/docs/http_head.md @@ -2,7 +2,7 @@ title: http head categories: | network -version: 0.103.0 +version: 0.104.0 network: | Get the headers from a URL. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Get headers from example.com diff --git a/commands/docs/http_options.md b/commands/docs/http_options.md index e613d10870b..5caa499ec03 100644 --- a/commands/docs/http_options.md +++ b/commands/docs/http_options.md @@ -2,7 +2,7 @@ title: http options categories: | network -version: 0.103.0 +version: 0.104.0 network: | Requests permitted communication options for a given URL. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Get options from example.com diff --git a/commands/docs/http_patch.md b/commands/docs/http_patch.md index 0d435d7f298..d4e249ccd57 100644 --- a/commands/docs/http_patch.md +++ b/commands/docs/http_patch.md @@ -2,7 +2,7 @@ title: http patch categories: | network -version: 0.103.0 +version: 0.104.0 network: | Patch a body to a URL. usage: | @@ -44,7 +44,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Patch content to example.com diff --git a/commands/docs/http_post.md b/commands/docs/http_post.md index 9ace43d8516..181fbf8f3ee 100644 --- a/commands/docs/http_post.md +++ b/commands/docs/http_post.md @@ -2,7 +2,7 @@ title: http post categories: | network -version: 0.103.0 +version: 0.104.0 network: | Post a body to a URL. usage: | @@ -44,7 +44,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Post content to example.com diff --git a/commands/docs/http_put.md b/commands/docs/http_put.md index e1ef9119265..881f838373f 100644 --- a/commands/docs/http_put.md +++ b/commands/docs/http_put.md @@ -2,7 +2,7 @@ title: http put categories: | network -version: 0.103.0 +version: 0.104.0 network: | Put a body to a URL. usage: | @@ -44,7 +44,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Put content to example.com diff --git a/commands/docs/if.md b/commands/docs/if.md index 0a6fa778fe4..8293752b8fa 100644 --- a/commands/docs/if.md +++ b/commands/docs/if.md @@ -2,7 +2,7 @@ title: if categories: | core -version: 0.103.0 +version: 0.104.0 core: | Conditionally run a block. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Output a value if a condition matches, otherwise return nothing diff --git a/commands/docs/ignore.md b/commands/docs/ignore.md index 0cbbfc1b7f7..4a9991918c1 100644 --- a/commands/docs/ignore.md +++ b/commands/docs/ignore.md @@ -2,7 +2,7 @@ title: ignore categories: | core -version: 0.103.0 +version: 0.104.0 core: | Ignore the output of the previous command in the pipeline. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------- | | any | nothing | - ## Examples Ignore the output of an echo command diff --git a/commands/docs/inc.md b/commands/docs/inc.md index 7b05ecf3cb2..d6423804131 100644 --- a/commands/docs/inc.md +++ b/commands/docs/inc.md @@ -2,7 +2,7 @@ title: inc categories: | default -version: 0.103.0 +version: 0.104.0 default: | Increment a value or version. Optionally use the column of a table. usage: | @@ -42,4 +42,4 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | -| any | any | +| any | any | \ No newline at end of file diff --git a/commands/docs/input.md b/commands/docs/input.md index cdf9490fb8c..840bc97a287 100644 --- a/commands/docs/input.md +++ b/commands/docs/input.md @@ -2,7 +2,7 @@ title: input categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Get input from the user. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Get input from the user, and assign to a variable diff --git a/commands/docs/input_list.md b/commands/docs/input_list.md index 221542ae5e1..37492d5fb69 100644 --- a/commands/docs/input_list.md +++ b/commands/docs/input_list.md @@ -2,7 +2,7 @@ title: input list categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Interactive list selection. usage: | diff --git a/commands/docs/input_listen.md b/commands/docs/input_listen.md index b823f7fa298..1a558303f2d 100644 --- a/commands/docs/input_listen.md +++ b/commands/docs/input_listen.md @@ -2,7 +2,7 @@ title: input listen categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Listen for user interface event. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------------------------------------------------ | | nothing | record\\> | - ## Examples Listen for a keyboard shortcut and find out how nu receives it diff --git a/commands/docs/insert.md b/commands/docs/insert.md index 42860d62334..a92ec2b4899 100644 --- a/commands/docs/insert.md +++ b/commands/docs/insert.md @@ -2,7 +2,7 @@ title: insert categories: | filters -version: 0.103.0 +version: 0.104.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 3420df9f418..a120daec9a1 100644 --- a/commands/docs/inspect.md +++ b/commands/docs/inspect.md @@ -2,7 +2,7 @@ title: inspect categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Inspect pipeline results while running a pipeline. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Inspect pipeline results diff --git a/commands/docs/interleave.md b/commands/docs/interleave.md index 2a229695a51..a3c657fc57f 100644 --- a/commands/docs/interleave.md +++ b/commands/docs/interleave.md @@ -2,7 +2,7 @@ title: interleave categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Read multiple streams in parallel and combine them into one stream. usage: | diff --git a/commands/docs/into.md b/commands/docs/into.md index a310c977098..30b963095d0 100644 --- a/commands/docs/into.md +++ b/commands/docs/into.md @@ -2,7 +2,7 @@ title: into categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Commands to convert data from one type to another. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/into_binary.md b/commands/docs/into_binary.md index 81b0ea80708..afd4c13cba9 100644 --- a/commands/docs/into_binary.md +++ b/commands/docs/into_binary.md @@ -2,7 +2,7 @@ title: into binary categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to a binary primitive. usage: | diff --git a/commands/docs/into_bool.md b/commands/docs/into_bool.md index 4a3309aae75..eb532f2fa85 100644 --- a/commands/docs/into_bool.md +++ b/commands/docs/into_bool.md @@ -2,7 +2,7 @@ title: into bool categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to boolean. usage: | diff --git a/commands/docs/into_cell-path.md b/commands/docs/into_cell-path.md index e11e2b5a724..668984b0543 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.103.0 +version: 0.104.0 conversions: | Convert value to a cell-path. usage: | diff --git a/commands/docs/into_datetime.md b/commands/docs/into_datetime.md index 477f3230423..23142a0a0cf 100644 --- a/commands/docs/into_datetime.md +++ b/commands/docs/into_datetime.md @@ -2,7 +2,7 @@ title: into datetime categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert text or timestamp into a datetime. usage: | @@ -26,7 +26,6 @@ contributors: false - `--offset, -o {int}`: Specify timezone by offset from UTC if the input is a Unix timestamp, like '+8', '-4' - `--format, -f {string}`: Specify expected format of INPUT string to parse to datetime. Use --list to see options - `--list, -l`: Show all possible variables for use in --format flag - - `--list-human, -n`: Show human-readable datetime parsing examples ## Parameters @@ -42,7 +41,7 @@ contributors: false | int | datetime | | list\ | list\ | | nothing | table | -| record | record | +| record | any | | string | datetime | | table | table | ## Examples @@ -89,6 +88,12 @@ Using a datetime as input simply returns the value Sat, 27 Feb 2021 13:55:40 +0000 (4 years ago) ``` +Using a record as input +```nu +> {year: 2025, month: 3, day: 30, hour: 12, minute: 15, second: 59, timezone: '+02:00'} | into datetime +Sun, 30 Mar 2025 10:15:59 +0000 (a month ago) +``` + Convert list of timestamps to datetimes ```nu > ["2023-03-30 10:10:07 -05:00", "2023-05-05 13:43:49 -05:00", "2023-06-05 01:37:42 -05:00"] | into datetime @@ -99,21 +104,3 @@ Convert list of timestamps to datetimes ╰───┴─────────────╯ ``` - -Parsing human readable datetimes -```nu -> 'Today at 18:30' | into datetime - -``` - -Parsing human readable datetimes -```nu -> 'Last Friday at 19:45' | into datetime - -``` - -Parsing human readable datetimes -```nu -> 'In 5 minutes and 30 seconds' | into datetime - -``` diff --git a/commands/docs/into_duration.md b/commands/docs/into_duration.md index 9f59480e89c..fd7100f7301 100644 --- a/commands/docs/into_duration.md +++ b/commands/docs/into_duration.md @@ -2,7 +2,7 @@ title: into duration categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to duration. usage: | @@ -34,7 +34,9 @@ contributors: false | input | output | | -------- | -------- | | duration | duration | +| float | duration | | int | duration | +| record | any | | string | duration | | table | table | ## Examples @@ -84,5 +86,17 @@ Convert a number of an arbitrary unit to duration 1sec 234ms ``` +Convert a floating point number of an arbitrary unit to duration +```nu +> 1.234 | into duration --unit sec +1sec 234ms +``` + +Convert a record to a duration +```nu +> {day: 10, hour: 2, minute: 6, second: 50, sign: '+'} | into duration +1wk 3day 2hr 6min 50sec +``` + ## Notes Max duration value is i64::MAX nanoseconds; max duration time unit is wk (weeks). \ No newline at end of file diff --git a/commands/docs/into_filesize.md b/commands/docs/into_filesize.md index 4962dd78a9a..ce2b271dd50 100644 --- a/commands/docs/into_filesize.md +++ b/commands/docs/into_filesize.md @@ -2,7 +2,7 @@ title: into filesize categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to filesize. usage: | diff --git a/commands/docs/into_float.md b/commands/docs/into_float.md index b3e89d3b519..26314e83681 100644 --- a/commands/docs/into_float.md +++ b/commands/docs/into_float.md @@ -2,7 +2,7 @@ title: into float categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert data into floating point number. usage: | diff --git a/commands/docs/into_glob.md b/commands/docs/into_glob.md index 4564ef854b3..d32881383a2 100644 --- a/commands/docs/into_glob.md +++ b/commands/docs/into_glob.md @@ -2,7 +2,7 @@ title: into glob categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to glob. usage: | diff --git a/commands/docs/into_int.md b/commands/docs/into_int.md index 4c4e8c4bec8..f8b76c84d4d 100644 --- a/commands/docs/into_int.md +++ b/commands/docs/into_int.md @@ -2,7 +2,7 @@ title: into int categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to integer. usage: | diff --git a/commands/docs/into_record.md b/commands/docs/into_record.md index 56d09ce4695..16b5507888f 100644 --- a/commands/docs/into_record.md +++ b/commands/docs/into_record.md @@ -2,7 +2,7 @@ title: into record categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to record. usage: | diff --git a/commands/docs/into_sqlite.md b/commands/docs/into_sqlite.md index a8b9baf3429..be6f7771e3b 100644 --- a/commands/docs/into_sqlite.md +++ b/commands/docs/into_sqlite.md @@ -2,7 +2,7 @@ title: into sqlite categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert table into a SQLite database. usage: | diff --git a/commands/docs/into_string.md b/commands/docs/into_string.md index e52f1796a4b..7e9ea60ef41 100644 --- a/commands/docs/into_string.md +++ b/commands/docs/into_string.md @@ -2,7 +2,7 @@ title: into string categories: | conversions -version: 0.103.0 +version: 0.104.0 conversions: | Convert value to string. usage: | diff --git a/commands/docs/into_value.md b/commands/docs/into_value.md index 9f21c91aa96..cd30caccd39 100644 --- a/commands/docs/into_value.md +++ b/commands/docs/into_value.md @@ -2,7 +2,7 @@ title: into value categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Infer Nushell datatype for each cell. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Infer Nushell values for each cell. diff --git a/commands/docs/is-admin.md b/commands/docs/is-admin.md index 7cdc8879a29..80edd8757bd 100644 --- a/commands/docs/is-admin.md +++ b/commands/docs/is-admin.md @@ -2,7 +2,7 @@ title: is-admin categories: | core -version: 0.103.0 +version: 0.104.0 core: | Check if nushell is running with administrator or root privileges. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | bool | - ## Examples Return 'iamroot' if nushell is running with admin/root privileges, and 'iamnotroot' if not. diff --git a/commands/docs/is-empty.md b/commands/docs/is-empty.md index 22c142b6085..35b70eff393 100644 --- a/commands/docs/is-empty.md +++ b/commands/docs/is-empty.md @@ -2,7 +2,7 @@ title: is-empty categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Check for empty values. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | bool | - ## Examples Check if a string is empty diff --git a/commands/docs/is-not-empty.md b/commands/docs/is-not-empty.md index 3240df01021..746cf74aa2c 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.103.0 +version: 0.104.0 filters: | Check for non-empty values. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | bool | - ## Examples Check if a string is empty diff --git a/commands/docs/is-terminal.md b/commands/docs/is-terminal.md index 7e21305fce3..3c7440f2c5c 100644 --- a/commands/docs/is-terminal.md +++ b/commands/docs/is-terminal.md @@ -2,7 +2,7 @@ title: is-terminal categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Check if stdin, stdout, or stderr is a terminal. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | bool | - ## Examples Return "terminal attached" if standard input is attached to a terminal, and "no terminal" if not. diff --git a/commands/docs/items.md b/commands/docs/items.md index fb33c67a20d..4071fa328ae 100644 --- a/commands/docs/items.md +++ b/commands/docs/items.md @@ -2,7 +2,7 @@ title: items categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Given a record, iterate on each pair of column name and associated value. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | record | any | - ## Examples Iterate over each key-value pair of a record diff --git a/commands/docs/job.md b/commands/docs/job.md index a78c9c1bed7..3fe9c1670ef 100644 --- a/commands/docs/job.md +++ b/commands/docs/job.md @@ -1,9 +1,9 @@ --- title: job categories: | - strings -version: 0.103.0 -strings: | + experimental +version: 0.104.0 +experimental: | Various commands for working with background jobs. usage: | Various commands for working with background jobs. @@ -12,7 +12,7 @@ contributors: false --- -# `job` for [strings](/commands/categories/strings.md) +# `job` for [experimental](/commands/categories/experimental.md)
Various commands for working with background jobs.
@@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. @@ -34,7 +33,12 @@ You must use one of the following subcommands. Using this command as-is will onl | name | description | type | | ------------------------------------------------ | -------------------------------------------- | -------- | +| [`job flush`](/commands/docs/job_flush.md) | Clear this job's mailbox. | built-in | +| [`job id`](/commands/docs/job_id.md) | Get id of current job. | built-in | | [`job kill`](/commands/docs/job_kill.md) | Kill a background job. | built-in | | [`job list`](/commands/docs/job_list.md) | List background jobs. | built-in | +| [`job recv`](/commands/docs/job_recv.md) | Read a message from the mailbox. | built-in | +| [`job send`](/commands/docs/job_send.md) | Send a message to the mailbox of a job. | built-in | | [`job spawn`](/commands/docs/job_spawn.md) | Spawn a background job and retrieve its ID. | built-in | +| [`job tag`](/commands/docs/job_tag.md) | Add a description tag to a background job. | built-in | | [`job unfreeze`](/commands/docs/job_unfreeze.md) | Unfreeze a frozen process job in foreground. | built-in | \ No newline at end of file diff --git a/commands/docs/job_flush.md b/commands/docs/job_flush.md new file mode 100644 index 00000000000..405f7272b1b --- /dev/null +++ b/commands/docs/job_flush.md @@ -0,0 +1,40 @@ +--- +title: job flush +categories: | + experimental +version: 0.104.0 +experimental: | + Clear this job's mailbox. +usage: | + Clear this job's mailbox. +editLink: false +contributors: false +--- + + +# `job flush` for [experimental](/commands/categories/experimental.md) + +
Clear this job's mailbox.
+ +## Signature + +```> job flush {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------- | +| nothing | nothing | +## Examples + +Clear the mailbox of the current job. +```nu +> job flush + +``` + +## Notes + +This command removes all messages in the mailbox of the current job. +If a message is received while this command is executing, it may also be discarded. diff --git a/commands/docs/job_id.md b/commands/docs/job_id.md new file mode 100644 index 00000000000..d1299049703 --- /dev/null +++ b/commands/docs/job_id.md @@ -0,0 +1,40 @@ +--- +title: job id +categories: | + experimental +version: 0.104.0 +experimental: | + Get id of current job. +usage: | + Get id of current job. +editLink: false +contributors: false +--- + + +# `job id` for [experimental](/commands/categories/experimental.md) + +
Get id of current job.
+ +## Signature + +```> job id {flags} ``` + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | int | +## Examples + +Get id of current job +```nu +> job id + +``` + +## Notes +This command returns the job id for the current background job. +The special id 0 indicates that this command was not called from a background job thread, and +was instead spawned by main nushell execution thread. \ No newline at end of file diff --git a/commands/docs/job_kill.md b/commands/docs/job_kill.md index c56589a16a3..26157f8f81a 100644 --- a/commands/docs/job_kill.md +++ b/commands/docs/job_kill.md @@ -2,7 +2,7 @@ title: job kill categories: | experimental -version: 0.103.0 +version: 0.104.0 experimental: | Kill a background job. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Kill a newly spawned job diff --git a/commands/docs/job_list.md b/commands/docs/job_list.md index 35b4465bab4..9ebef6123fe 100644 --- a/commands/docs/job_list.md +++ b/commands/docs/job_list.md @@ -2,7 +2,7 @@ title: job list categories: | experimental -version: 0.103.0 +version: 0.104.0 experimental: | List background jobs. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples List all background jobs diff --git a/commands/docs/job_recv.md b/commands/docs/job_recv.md new file mode 100644 index 00000000000..5bf353b08f3 --- /dev/null +++ b/commands/docs/job_recv.md @@ -0,0 +1,67 @@ +--- +title: job recv +categories: | + experimental +version: 0.104.0 +experimental: | + Read a message from the mailbox. +usage: | + Read a message from the mailbox. +editLink: false +contributors: false +--- + + +# `job recv` for [experimental](/commands/categories/experimental.md) + +
Read a message from the mailbox.
+ +## Signature + +```> job recv {flags} ``` + +## Flags + + - `--tag {int}`: A tag for the message + - `--timeout {duration}`: The maximum time duration to wait for. + + +## Input/output types: + +| input | output | +| ------- | ------ | +| nothing | any | +## Examples + +Block the current thread while no message arrives +```nu +> job recv + +``` + +Receive a message, wait for at most 10 seconds. +```nu +> job recv --timeout 10sec + +``` + +Get a message or fail if no message is available immediately +```nu +> job recv --timeout 0sec + +``` + +## Notes +When messages are sent to the current process, they get stored in what is called the "mailbox". +This commands reads and returns a message from the mailbox, in a first-in-first-out fashion. +j +Messages may have numeric flags attached to them. This commands supports filtering out messages that do not satisfy a given tag, by using the `tag` flag. +If no tag is specified, this command will accept any message. + +If no message with the specified tag (if any) is available in the mailbox, this command will block the current thread until one arrives. +By default this command block indefinitely until a matching message arrives, but a timeout duration can be specified. +If a timeout duration of zero is specified, it will succeed only if there already is a message in the mailbox. + +Note: When using par-each, only one thread at a time can utilize this command. +In the case of two or more threads running this command, they will wait until other threads are done using it, +in no particular order, regardless of the specified timeout parameter. diff --git a/commands/docs/job_send.md b/commands/docs/job_send.md new file mode 100644 index 00000000000..c631550fd4c --- /dev/null +++ b/commands/docs/job_send.md @@ -0,0 +1,54 @@ +--- +title: job send +categories: | + experimental +version: 0.104.0 +experimental: | + Send a message to the mailbox of a job. +usage: | + Send a message to the mailbox of a job. +editLink: false +contributors: false +--- + + +# `job send` for [experimental](/commands/categories/experimental.md) + +
Send a message to the mailbox of a job.
+ +## Signature + +```> job send {flags} (id)``` + +## Flags + + - `--tag {int}`: A tag for the message + +## Parameters + + - `id`: The id of the job to send the message to. + + +## Input/output types: + +| input | output | +| ----- | ------- | +| any | nothing | +## Examples + +Send a message to a newly spawned job +```nu +> let id = job spawn { job recv | save sent.txt }; 'hi' | job send $id + +``` + +## Notes + +This command sends a message to a background job, which can then read sent messages +in a first-in-first-out fashion with `job recv`. When it does so, it may additionally specify a numeric filter tag, +in which case it will only read messages sent with the exact same filter tag. +In particular, the id 0 refers to the main/initial nushell thread. + +A message can be any nushell value, and streams are always collected before being sent. + +This command never blocks. diff --git a/commands/docs/job_spawn.md b/commands/docs/job_spawn.md index 3bc5f022f7a..fa066fdb32b 100644 --- a/commands/docs/job_spawn.md +++ b/commands/docs/job_spawn.md @@ -2,7 +2,7 @@ title: job spawn categories: | experimental -version: 0.103.0 +version: 0.104.0 experimental: | Spawn a background job and retrieve its ID. usage: | @@ -20,6 +20,10 @@ contributors: false ```> job spawn {flags} (closure)``` +## Flags + + - `--tag, -t {string}`: An optional description tag for this job + ## Parameters - `closure`: The closure to run in another thread. @@ -30,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | int | - ## Examples Spawn a background job to do some time consuming work diff --git a/commands/docs/job_tag.md b/commands/docs/job_tag.md new file mode 100644 index 00000000000..09e7d85f3f4 --- /dev/null +++ b/commands/docs/job_tag.md @@ -0,0 +1,46 @@ +--- +title: job tag +categories: | + experimental +version: 0.104.0 +experimental: | + Add a description tag to a background job. +usage: | + Add a description tag to a background job. +editLink: false +contributors: false +--- + + +# `job tag` for [experimental](/commands/categories/experimental.md) + +
Add a description tag to a background job.
+ +## Signature + +```> job tag {flags} (id) (tag)``` + +## Parameters + + - `id`: The id of the job to tag. + - `tag`: The tag to assign to the job. + + +## Input/output types: + +| input | output | +| ------- | ------- | +| nothing | nothing | +## Examples + +Tag a newly spawned job +```nu +> let id = job spawn { sleep 10sec }; job tag $id abc + +``` + +Remove the tag of a job +```nu +> let id = job spawn { sleep 10sec }; job tag $id abc; job tag $id null + +``` diff --git a/commands/docs/job_unfreeze.md b/commands/docs/job_unfreeze.md index 95d82ca05c9..7aef8388db3 100644 --- a/commands/docs/job_unfreeze.md +++ b/commands/docs/job_unfreeze.md @@ -2,7 +2,7 @@ title: job unfreeze categories: | experimental -version: 0.103.0 +version: 0.104.0 experimental: | Unfreeze a frozen process job in foreground. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Unfreeze the latest frozen job diff --git a/commands/docs/join.md b/commands/docs/join.md index 49b8471a669..34b6dc3e3e9 100644 --- a/commands/docs/join.md +++ b/commands/docs/join.md @@ -2,7 +2,7 @@ title: join categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Join two tables. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Join two tables diff --git a/commands/docs/keybindings.md b/commands/docs/keybindings.md index 32eafff67a4..cce61e6125b 100644 --- a/commands/docs/keybindings.md +++ b/commands/docs/keybindings.md @@ -2,7 +2,7 @@ title: keybindings categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Keybindings related commands. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/keybindings_default.md b/commands/docs/keybindings_default.md index de50fbdf7b4..8e06d78d3d2 100644 --- a/commands/docs/keybindings_default.md +++ b/commands/docs/keybindings_default.md @@ -2,7 +2,7 @@ title: keybindings default categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | List default keybindings. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Get list with default keybindings diff --git a/commands/docs/keybindings_list.md b/commands/docs/keybindings_list.md index b9f9450dcfc..396c68af2ca 100644 --- a/commands/docs/keybindings_list.md +++ b/commands/docs/keybindings_list.md @@ -2,7 +2,7 @@ title: keybindings list categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | List available options that can be used to create keybindings. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Get list of key modifiers diff --git a/commands/docs/keybindings_listen.md b/commands/docs/keybindings_listen.md index d5321fcccb9..2583236e45a 100644 --- a/commands/docs/keybindings_listen.md +++ b/commands/docs/keybindings_listen.md @@ -2,7 +2,7 @@ title: keybindings listen categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Get input from the user. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Type and see key event codes diff --git a/commands/docs/kill.md b/commands/docs/kill.md index 0c189a5516e..20fa5863fee 100644 --- a/commands/docs/kill.md +++ b/commands/docs/kill.md @@ -2,7 +2,7 @@ title: kill categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Kill a process using the process id. usage: | @@ -18,7 +18,7 @@ contributors: false ## Signature -```> kill {flags} (pid) ...rest``` +```> kill {flags} ...rest``` ## Flags @@ -28,8 +28,7 @@ contributors: false ## Parameters - - `pid`: Process id of process that is to be killed. - - `...rest`: Rest of processes to kill. + - `...rest`: Process ids of processes that are to be killed. ## Input/output types: @@ -37,7 +36,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Kill the pid using the most memory diff --git a/commands/docs/last.md b/commands/docs/last.md index e1ca3595035..3feaaa5e6ef 100644 --- a/commands/docs/last.md +++ b/commands/docs/last.md @@ -2,7 +2,7 @@ title: last categories: | filters -version: 0.103.0 +version: 0.104.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 3195d121b23..d4bfe4437fd 100644 --- a/commands/docs/length.md +++ b/commands/docs/length.md @@ -2,7 +2,7 @@ title: length categories: | filters -version: 0.103.0 +version: 0.104.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 be1ce1700a4..af55fbfd5fa 100644 --- a/commands/docs/let-env.md +++ b/commands/docs/let-env.md @@ -2,7 +2,7 @@ title: let-env categories: | removed -version: 0.103.0 +version: 0.104.0 removed: | `let-env FOO = ...` has been removed, use `$env.FOO = ...` instead. usage: | @@ -30,4 +30,4 @@ contributors: false | input | output | | ------- | ------- | -| nothing | nothing | +| nothing | nothing | \ No newline at end of file diff --git a/commands/docs/let.md b/commands/docs/let.md index 7417ebef501..8682b480bd6 100644 --- a/commands/docs/let.md +++ b/commands/docs/let.md @@ -2,7 +2,7 @@ title: let categories: | core -version: 0.103.0 +version: 0.104.0 core: | Create a variable and give it a value. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------- | | any | nothing | - ## Examples Set a variable to a value diff --git a/commands/docs/lines.md b/commands/docs/lines.md index 627e0bb0527..c9c976e72f2 100644 --- a/commands/docs/lines.md +++ b/commands/docs/lines.md @@ -2,7 +2,7 @@ title: lines categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Converts input to lines. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------------ | | any | list\ | - ## Examples Split multi-line string into lines diff --git a/commands/docs/load-env.md b/commands/docs/load-env.md index 02b6cf9176c..c3ba5f4d266 100644 --- a/commands/docs/load-env.md +++ b/commands/docs/load-env.md @@ -2,7 +2,7 @@ title: load-env categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Loads an environment update from a record. usage: | diff --git a/commands/docs/loop.md b/commands/docs/loop.md index 493a4991d8f..66b8a6add65 100644 --- a/commands/docs/loop.md +++ b/commands/docs/loop.md @@ -2,7 +2,7 @@ title: loop categories: | core -version: 0.103.0 +version: 0.104.0 core: | Run a block in a loop. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Loop while a condition is true diff --git a/commands/docs/ls.md b/commands/docs/ls.md index 66e99106a7f..d3bf7cf8135 100644 --- a/commands/docs/ls.md +++ b/commands/docs/ls.md @@ -2,7 +2,7 @@ title: ls categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | List the filenames, sizes, and modification times of items in a directory. usage: | @@ -41,7 +41,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples List visible files in the current directory diff --git a/commands/docs/match.md b/commands/docs/match.md index 0098958d774..19dd3dfa7f9 100644 --- a/commands/docs/match.md +++ b/commands/docs/match.md @@ -2,7 +2,7 @@ title: match categories: | core -version: 0.103.0 +version: 0.104.0 core: | Conditionally run a block on a matched value. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Match on a value in range diff --git a/commands/docs/math.md b/commands/docs/math.md index d7c54a7b424..e9d1ed9c736 100644 --- a/commands/docs/math.md +++ b/commands/docs/math.md @@ -2,7 +2,7 @@ title: math categories: | math -version: 0.103.0 +version: 0.104.0 math: | Use mathematical functions as aggregate functions on a list of numbers or tables. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/math_abs.md b/commands/docs/math_abs.md index 6155742eb12..d2e5f2175f7 100644 --- a/commands/docs/math_abs.md +++ b/commands/docs/math_abs.md @@ -2,7 +2,7 @@ title: math abs categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the absolute value of a number. usage: | @@ -29,6 +29,7 @@ contributors: false | list\ | list\ | | list\ | list\ | | number | number | +| range | list\ | ## Examples Compute absolute value of each number in a list of numbers diff --git a/commands/docs/math_arccos.md b/commands/docs/math_arccos.md index d7e4ff1ebf4..283dd03ffd3 100644 --- a/commands/docs/math_arccos.md +++ b/commands/docs/math_arccos.md @@ -2,7 +2,7 @@ title: math arccos categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the arccosine of the number. usage: | diff --git a/commands/docs/math_arccosh.md b/commands/docs/math_arccosh.md index e8249d1c578..b2036170d7c 100644 --- a/commands/docs/math_arccosh.md +++ b/commands/docs/math_arccosh.md @@ -2,7 +2,7 @@ title: math arccosh categories: | math -version: 0.103.0 +version: 0.104.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 51ca322d220..1cb6f914884 100644 --- a/commands/docs/math_arcsin.md +++ b/commands/docs/math_arcsin.md @@ -2,7 +2,7 @@ title: math arcsin categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the arcsine of the number. usage: | diff --git a/commands/docs/math_arcsinh.md b/commands/docs/math_arcsinh.md index 99c133dd115..e72ecdc48a3 100644 --- a/commands/docs/math_arcsinh.md +++ b/commands/docs/math_arcsinh.md @@ -2,7 +2,7 @@ title: math arcsinh categories: | math -version: 0.103.0 +version: 0.104.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 302c418b475..b7410096067 100644 --- a/commands/docs/math_arctan.md +++ b/commands/docs/math_arctan.md @@ -2,7 +2,7 @@ title: math arctan categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the arctangent of the number. usage: | diff --git a/commands/docs/math_arctanh.md b/commands/docs/math_arctanh.md index 113ee61903b..ea90af9102b 100644 --- a/commands/docs/math_arctanh.md +++ b/commands/docs/math_arctanh.md @@ -2,7 +2,7 @@ title: math arctanh categories: | math -version: 0.103.0 +version: 0.104.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 9b5623f41b9..51252f5abb7 100644 --- a/commands/docs/math_avg.md +++ b/commands/docs/math_avg.md @@ -2,7 +2,7 @@ title: math avg categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the average of a list of numbers. usage: | diff --git a/commands/docs/math_ceil.md b/commands/docs/math_ceil.md index fec62875a39..83010108a6a 100644 --- a/commands/docs/math_ceil.md +++ b/commands/docs/math_ceil.md @@ -2,7 +2,7 @@ title: math ceil categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the ceil of a number (smallest integer greater than or equal to that number). usage: | @@ -23,10 +23,11 @@ contributors: false ## Input/output types: -| input | output | -| ------------ | --------- | -| list\ | list\ | -| number | int | +| input | output | +| ------------ | ------------ | +| list\ | list\ | +| number | int | +| range | list\ | ## Examples Apply the ceil function to a list of numbers diff --git a/commands/docs/math_cos.md b/commands/docs/math_cos.md index da56c6376dc..181f8bf9f96 100644 --- a/commands/docs/math_cos.md +++ b/commands/docs/math_cos.md @@ -2,7 +2,7 @@ title: math cos categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the cosine of the number. usage: | diff --git a/commands/docs/math_cosh.md b/commands/docs/math_cosh.md index 34037ce7867..a7af86cb5a8 100644 --- a/commands/docs/math_cosh.md +++ b/commands/docs/math_cosh.md @@ -2,7 +2,7 @@ title: math cosh categories: | math -version: 0.103.0 +version: 0.104.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 bfdd4690aa0..132b9646cba 100644 --- a/commands/docs/math_exp.md +++ b/commands/docs/math_exp.md @@ -2,7 +2,7 @@ title: math exp categories: | math -version: 0.103.0 +version: 0.104.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 e62419cb45f..ab1e19b19c5 100644 --- a/commands/docs/math_floor.md +++ b/commands/docs/math_floor.md @@ -2,7 +2,7 @@ title: math floor categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the floor of a number (largest integer less than or equal to that number). usage: | @@ -23,10 +23,11 @@ contributors: false ## Input/output types: -| input | output | -| ------------ | --------- | -| list\ | list\ | -| number | int | +| input | output | +| ------------ | ------------ | +| list\ | list\ | +| number | int | +| range | list\ | ## Examples Apply the floor function to a list of numbers diff --git a/commands/docs/math_ln.md b/commands/docs/math_ln.md index f619a64b25e..7602deaeeae 100644 --- a/commands/docs/math_ln.md +++ b/commands/docs/math_ln.md @@ -2,7 +2,7 @@ title: math ln categories: | math -version: 0.103.0 +version: 0.104.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 acb193da0a0..9214d4384af 100644 --- a/commands/docs/math_log.md +++ b/commands/docs/math_log.md @@ -2,7 +2,7 @@ title: math log categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the logarithm for an arbitrary base. usage: | @@ -27,10 +27,11 @@ contributors: false ## Input/output types: -| input | output | -| ------------ | ----------- | -| list\ | list\ | -| number | float | +| input | output | +| ------------ | ------------ | +| list\ | list\ | +| number | float | +| range | list\ | ## Examples Get the logarithm of 100 to the base 10 diff --git a/commands/docs/math_max.md b/commands/docs/math_max.md index e74504541e7..ecf53340cae 100644 --- a/commands/docs/math_max.md +++ b/commands/docs/math_max.md @@ -2,7 +2,7 @@ title: math max categories: | math -version: 0.103.0 +version: 0.104.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 fb92fdca8db..eebdde6325f 100644 --- a/commands/docs/math_median.md +++ b/commands/docs/math_median.md @@ -2,7 +2,7 @@ title: math median categories: | math -version: 0.103.0 +version: 0.104.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 bf92e7bf983..9dd8af144aa 100644 --- a/commands/docs/math_min.md +++ b/commands/docs/math_min.md @@ -2,7 +2,7 @@ title: math min categories: | math -version: 0.103.0 +version: 0.104.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 cdf26d5f48f..9048b41a4cc 100644 --- a/commands/docs/math_mode.md +++ b/commands/docs/math_mode.md @@ -2,7 +2,7 @@ title: math mode categories: | math -version: 0.103.0 +version: 0.104.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 2bb5657750a..7f02c481720 100644 --- a/commands/docs/math_product.md +++ b/commands/docs/math_product.md @@ -2,7 +2,7 @@ title: math product categories: | math -version: 0.103.0 +version: 0.104.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 022935770b2..07adc5061e5 100644 --- a/commands/docs/math_round.md +++ b/commands/docs/math_round.md @@ -2,7 +2,7 @@ title: math round categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the input number rounded to the specified precision. usage: | @@ -31,6 +31,7 @@ contributors: false | ------------ | ------------ | | list\ | list\ | | number | number | +| range | list\ | ## Examples Apply the round function to a list of numbers diff --git a/commands/docs/math_sin.md b/commands/docs/math_sin.md index 96ccc44b89f..5f30710d92c 100644 --- a/commands/docs/math_sin.md +++ b/commands/docs/math_sin.md @@ -2,7 +2,7 @@ title: math sin categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the sine of the number. usage: | diff --git a/commands/docs/math_sinh.md b/commands/docs/math_sinh.md index a1c6f0f086d..9cb8e9c2c66 100644 --- a/commands/docs/math_sinh.md +++ b/commands/docs/math_sinh.md @@ -2,7 +2,7 @@ title: math sinh categories: | math -version: 0.103.0 +version: 0.104.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 723fa9cc88c..3013ae1d340 100644 --- a/commands/docs/math_sqrt.md +++ b/commands/docs/math_sqrt.md @@ -2,7 +2,7 @@ title: math sqrt categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the square root of the input number. usage: | @@ -23,10 +23,11 @@ contributors: false ## Input/output types: -| input | output | -| ------------ | ----------- | -| list\ | list\ | -| number | float | +| input | output | +| ------------ | ------------ | +| list\ | list\ | +| number | float | +| range | list\ | ## Examples Compute the square root of each number in a list diff --git a/commands/docs/math_stddev.md b/commands/docs/math_stddev.md index 8191bc61f05..5fc7505a049 100644 --- a/commands/docs/math_stddev.md +++ b/commands/docs/math_stddev.md @@ -2,7 +2,7 @@ title: math stddev categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the standard deviation of a list of numbers, or of each column in a table. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ------------ | ------ | | list\ | number | +| range | number | | record | record | | table | record | ## Examples diff --git a/commands/docs/math_sum.md b/commands/docs/math_sum.md index 4a1482dbe3e..07ef191bbe0 100644 --- a/commands/docs/math_sum.md +++ b/commands/docs/math_sum.md @@ -2,7 +2,7 @@ title: math sum categories: | math -version: 0.103.0 +version: 0.104.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 b2fb7945f30..a3164a45c1e 100644 --- a/commands/docs/math_tan.md +++ b/commands/docs/math_tan.md @@ -2,7 +2,7 @@ title: math tan categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the tangent of the number. usage: | diff --git a/commands/docs/math_tanh.md b/commands/docs/math_tanh.md index 828d2f395b7..4d46a85e775 100644 --- a/commands/docs/math_tanh.md +++ b/commands/docs/math_tanh.md @@ -2,7 +2,7 @@ title: math tanh categories: | math -version: 0.103.0 +version: 0.104.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 45fc675f3fa..fbacf655a87 100644 --- a/commands/docs/math_variance.md +++ b/commands/docs/math_variance.md @@ -2,7 +2,7 @@ title: math variance categories: | math -version: 0.103.0 +version: 0.104.0 math: | Returns the variance of a list of numbers or of each column in a table. usage: | @@ -30,6 +30,7 @@ contributors: false | input | output | | ------------ | ------ | | list\ | number | +| range | number | | record | record | | table | record | ## Examples diff --git a/commands/docs/merge.md b/commands/docs/merge.md index 16809e11e7f..0ef57ccdd94 100644 --- a/commands/docs/merge.md +++ b/commands/docs/merge.md @@ -2,7 +2,7 @@ title: merge categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Merge the input with a record or table, overwriting values in matching columns. usage: | @@ -78,4 +78,4 @@ repeating this process with row 1, and so on. | name | description | type | | -------------------------------------------- | --------------------------------------------------------------------------------------- | -------- | -| [`merge deep`](/commands/docs/merge_deep.md) | Merge the input with a record or table, recursively merging values in matching columns. | built-in | +| [`merge deep`](/commands/docs/merge_deep.md) | Merge the input with a record or table, recursively merging values in matching columns. | built-in | \ No newline at end of file diff --git a/commands/docs/merge_deep.md b/commands/docs/merge_deep.md index 6fe88c6c7d5..ab4dfcc59c7 100644 --- a/commands/docs/merge_deep.md +++ b/commands/docs/merge_deep.md @@ -2,7 +2,7 @@ title: merge deep categories: | filters -version: 0.103.0 +version: 0.104.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 086aba20ae6..b91862c152b 100644 --- a/commands/docs/metadata.md +++ b/commands/docs/metadata.md @@ -2,7 +2,7 @@ title: metadata categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Get the metadata for items in the stream. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | record | - ## Examples Get the metadata of a variable diff --git a/commands/docs/metadata_access.md b/commands/docs/metadata_access.md index 5b0aa74744c..9cda4c26b67 100644 --- a/commands/docs/metadata_access.md +++ b/commands/docs/metadata_access.md @@ -2,7 +2,7 @@ title: metadata access categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Access the metadata for the input stream within a closure. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Access metadata and data from a stream together diff --git a/commands/docs/metadata_set.md b/commands/docs/metadata_set.md index e8e8900d7ec..1b4c6caba70 100644 --- a/commands/docs/metadata_set.md +++ b/commands/docs/metadata_set.md @@ -2,7 +2,7 @@ title: metadata set categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Set the metadata for items in the stream. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Set the metadata of a table literal diff --git a/commands/docs/mkdir.md b/commands/docs/mkdir.md index d236ba4ab2a..70bba0408ac 100644 --- a/commands/docs/mkdir.md +++ b/commands/docs/mkdir.md @@ -2,7 +2,7 @@ title: mkdir categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Create directories, with intermediary directories if required using uutils/coreutils mkdir. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Make a directory named foo diff --git a/commands/docs/mktemp.md b/commands/docs/mktemp.md index b50b79c758b..efabb053056 100644 --- a/commands/docs/mktemp.md +++ b/commands/docs/mktemp.md @@ -2,7 +2,7 @@ title: mktemp categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Create temporary files or directories using uutils/coreutils mktemp. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Make a temporary file with the given suffix in the current working directory. diff --git a/commands/docs/module.md b/commands/docs/module.md index dcf48b07102..319ee755984 100644 --- a/commands/docs/module.md +++ b/commands/docs/module.md @@ -2,7 +2,7 @@ title: module categories: | core -version: 0.103.0 +version: 0.104.0 core: | Define a custom module. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Define a custom command in a module and call it diff --git a/commands/docs/move.md b/commands/docs/move.md index d709cc77184..686e587c2c7 100644 --- a/commands/docs/move.md +++ b/commands/docs/move.md @@ -2,7 +2,7 @@ title: move categories: | filters -version: 0.103.0 +version: 0.104.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 7f9a12d6f58..8726fb865b9 100644 --- a/commands/docs/mut.md +++ b/commands/docs/mut.md @@ -2,7 +2,7 @@ title: mut categories: | core -version: 0.103.0 +version: 0.104.0 core: | Create a mutable variable and give it a value. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------- | | any | nothing | - ## Examples Set a mutable variable to a value, then update it diff --git a/commands/docs/mv.md b/commands/docs/mv.md index 6b31a695f09..c05d5acc91d 100644 --- a/commands/docs/mv.md +++ b/commands/docs/mv.md @@ -2,7 +2,7 @@ title: mv categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Move files or directories using uutils/coreutils mv. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Rename a file diff --git a/commands/docs/nu-check.md b/commands/docs/nu-check.md index cd6d15bf4cb..db21550a494 100644 --- a/commands/docs/nu-check.md +++ b/commands/docs/nu-check.md @@ -2,7 +2,7 @@ title: nu-check categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Validate and parse input content. usage: | diff --git a/commands/docs/nu-highlight.md b/commands/docs/nu-highlight.md index 1370007e78c..260c04f5033 100644 --- a/commands/docs/nu-highlight.md +++ b/commands/docs/nu-highlight.md @@ -2,7 +2,7 @@ title: nu-highlight categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Syntax highlight the input string. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | string | - ## Examples Describe the type of a string diff --git a/commands/docs/open.md b/commands/docs/open.md index 5fba937a16f..4c8c1c9fe21 100644 --- a/commands/docs/open.md +++ b/commands/docs/open.md @@ -2,7 +2,7 @@ title: open categories: | filesystem -version: 0.103.0 +version: 0.104.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 b6cf8efee0a..8697b9296dd 100644 --- a/commands/docs/overlay.md +++ b/commands/docs/overlay.md @@ -2,7 +2,7 @@ title: overlay categories: | core -version: 0.103.0 +version: 0.104.0 core: | Commands for manipulating overlays. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html diff --git a/commands/docs/overlay_hide.md b/commands/docs/overlay_hide.md index 86f60bffa97..4d093edd5fb 100644 --- a/commands/docs/overlay_hide.md +++ b/commands/docs/overlay_hide.md @@ -2,7 +2,7 @@ title: overlay hide categories: | core -version: 0.103.0 +version: 0.104.0 core: | Hide an active overlay. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Keep a custom command after hiding the overlay diff --git a/commands/docs/overlay_list.md b/commands/docs/overlay_list.md index f17c2062c85..58347cb5a8f 100644 --- a/commands/docs/overlay_list.md +++ b/commands/docs/overlay_list.md @@ -2,7 +2,7 @@ title: overlay list categories: | core -version: 0.103.0 +version: 0.104.0 core: | List all active overlays. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples Get the last activated overlay diff --git a/commands/docs/overlay_new.md b/commands/docs/overlay_new.md index f6a4078e892..db2fd9f9cbb 100644 --- a/commands/docs/overlay_new.md +++ b/commands/docs/overlay_new.md @@ -2,7 +2,7 @@ title: overlay new categories: | core -version: 0.103.0 +version: 0.104.0 core: | Create an empty overlay. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Create an empty overlay diff --git a/commands/docs/overlay_use.md b/commands/docs/overlay_use.md index d09475ea2c5..380b50ddf33 100644 --- a/commands/docs/overlay_use.md +++ b/commands/docs/overlay_use.md @@ -2,7 +2,7 @@ title: overlay use categories: | core -version: 0.103.0 +version: 0.104.0 core: | Use definitions from a module as an overlay. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Create an overlay from a module diff --git a/commands/docs/panic.md b/commands/docs/panic.md index 147ae123e82..4b634a9cb67 100644 --- a/commands/docs/panic.md +++ b/commands/docs/panic.md @@ -2,7 +2,7 @@ title: panic categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Causes nushell to panic. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Panic with a custom message diff --git a/commands/docs/par-each.md b/commands/docs/par-each.md index 8ead9c2a5e5..9af497e244b 100644 --- a/commands/docs/par-each.md +++ b/commands/docs/par-each.md @@ -2,7 +2,7 @@ title: par-each categories: | filters -version: 0.103.0 +version: 0.104.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 0dec75c80ad..b3d9d654b94 100644 --- a/commands/docs/parse.md +++ b/commands/docs/parse.md @@ -2,7 +2,7 @@ title: parse categories: | strings -version: 0.103.0 +version: 0.104.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 8466a84cbdf..a63598efa60 100644 --- a/commands/docs/path.md +++ b/commands/docs/path.md @@ -2,7 +2,7 @@ title: path categories: | path -version: 0.103.0 +version: 0.104.0 path: | Explore and manipulate paths. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/path_basename.md b/commands/docs/path_basename.md index 8239d380f03..66714c38d53 100644 --- a/commands/docs/path_basename.md +++ b/commands/docs/path_basename.md @@ -2,7 +2,7 @@ title: path basename categories: | path -version: 0.103.0 +version: 0.104.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 c9bf13fe987..607c2c5e74f 100644 --- a/commands/docs/path_dirname.md +++ b/commands/docs/path_dirname.md @@ -2,7 +2,7 @@ title: path dirname categories: | path -version: 0.103.0 +version: 0.104.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 834eda03abc..9db9a43f780 100644 --- a/commands/docs/path_exists.md +++ b/commands/docs/path_exists.md @@ -2,7 +2,7 @@ title: path exists categories: | path -version: 0.103.0 +version: 0.104.0 path: | Check whether a path exists. usage: | diff --git a/commands/docs/path_expand.md b/commands/docs/path_expand.md index 5116d291f06..449549977aa 100644 --- a/commands/docs/path_expand.md +++ b/commands/docs/path_expand.md @@ -2,7 +2,7 @@ title: path expand categories: | path -version: 0.103.0 +version: 0.104.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 69b7de3f7e9..f6c416acc81 100644 --- a/commands/docs/path_join.md +++ b/commands/docs/path_join.md @@ -2,7 +2,7 @@ title: path join categories: | path -version: 0.103.0 +version: 0.104.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 b6cc1438d9f..0ee25f470a4 100644 --- a/commands/docs/path_parse.md +++ b/commands/docs/path_parse.md @@ -2,7 +2,7 @@ title: path parse categories: | path -version: 0.103.0 +version: 0.104.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 2530b237220..5d135af8e96 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.103.0 +version: 0.104.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 7dab545fc4f..4fc7bbd742f 100644 --- a/commands/docs/path_self.md +++ b/commands/docs/path_self.md @@ -2,7 +2,7 @@ title: path self categories: | path -version: 0.103.0 +version: 0.104.0 path: | Get the absolute path of the script or module containing this command at parse time. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Get the path of the current file diff --git a/commands/docs/path_split.md b/commands/docs/path_split.md index fe9589548bf..ee17ae2dd47 100644 --- a/commands/docs/path_split.md +++ b/commands/docs/path_split.md @@ -2,7 +2,7 @@ title: path split categories: | path -version: 0.103.0 +version: 0.104.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 e4f7c8e1fb2..e39fb6016ac 100644 --- a/commands/docs/path_type.md +++ b/commands/docs/path_type.md @@ -2,7 +2,7 @@ title: path type categories: | path -version: 0.103.0 +version: 0.104.0 path: | Get the type of the object a path refers to (e.g., file, dir, symlink). usage: | diff --git a/commands/docs/plugin.md b/commands/docs/plugin.md index f1ab4a4b6a0..fd6e70cb74e 100644 --- a/commands/docs/plugin.md +++ b/commands/docs/plugin.md @@ -2,7 +2,7 @@ title: plugin categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | Commands for managing plugins. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Run the `nu_plugin_inc` plugin from the current directory and install its signatures. diff --git a/commands/docs/plugin_add.md b/commands/docs/plugin_add.md index 0ffa9757f3c..26b8b021a84 100644 --- a/commands/docs/plugin_add.md +++ b/commands/docs/plugin_add.md @@ -2,7 +2,7 @@ title: plugin add categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | Add a plugin to the plugin registry file. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Run the `nu_plugin_inc` plugin from the current directory or $env.NU_PLUGIN_DIRS and install its signatures. diff --git a/commands/docs/plugin_list.md b/commands/docs/plugin_list.md index d83f3047812..27874e383c0 100644 --- a/commands/docs/plugin_list.md +++ b/commands/docs/plugin_list.md @@ -2,7 +2,7 @@ title: plugin list categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | List loaded and installed plugins. usage: | @@ -32,19 +32,18 @@ contributors: false | input | output | | ------- | ----------------------------------------------------------------------------------------------------------------------- | | nothing | table\\> | - ## Examples List installed plugins. ```nu > plugin list -╭───┬──────┬─────────┬─────────┬────────┬───────────────────────────────┬───────┬─────────────╮ -│ # │ name │ version │ status │ pid │ filename │ shell │ commands │ -├───┼──────┼─────────┼─────────┼────────┼───────────────────────────────┼───────┼─────────────┤ -│ 0 │ inc │ 0.103.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ -│ │ │ │ │ │ │ │ │ 0 │ inc │ │ -│ │ │ │ │ │ │ │ ╰───┴─────╯ │ -╰───┴──────┴─────────┴─────────┴────────┴───────────────────────────────┴───────┴─────────────╯ +╭─────┬────────┬──────────────────────┬───────────┬──────────┬────────────────────────────────┬────────┬──────────────╮ +│ # │ name │ version │ status │ pid │ filename │ shell │ commands │ +├─────┼────────┼──────────────────────┼───────────┼──────────┼────────────────────────────────┼────────┼──────────────┤ +│ 0 │ inc │ 0.104.0 │ running │ 106480 │ /opt/nu/plugins/nu_plugin_inc │ │ ╭───┬─────╮ │ +│ │ │ │ │ │ │ │ │ 0 │ inc │ │ +│ │ │ │ │ │ │ │ ╰───┴─────╯ │ +╰─────┴────────┴──────────────────────┴───────────┴──────────┴────────────────────────────────┴────────┴──────────────╯ ``` diff --git a/commands/docs/plugin_rm.md b/commands/docs/plugin_rm.md index aba84ebaa44..77ef2072172 100644 --- a/commands/docs/plugin_rm.md +++ b/commands/docs/plugin_rm.md @@ -2,7 +2,7 @@ title: plugin rm categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | Remove a plugin from the plugin registry file. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Remove the installed signatures for the `inc` plugin. diff --git a/commands/docs/plugin_stop.md b/commands/docs/plugin_stop.md index 9d2913add80..191d696026b 100644 --- a/commands/docs/plugin_stop.md +++ b/commands/docs/plugin_stop.md @@ -2,7 +2,7 @@ title: plugin stop categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | Stop an installed plugin if it was running. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Stop the plugin named `inc`. diff --git a/commands/docs/plugin_use.md b/commands/docs/plugin_use.md index 11cff4d84de..0d4070cc8c6 100644 --- a/commands/docs/plugin_use.md +++ b/commands/docs/plugin_use.md @@ -2,7 +2,7 @@ title: plugin use categories: | plugin -version: 0.103.0 +version: 0.104.0 plugin: | Load a plugin from the plugin registry file into scope. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Load the commands for the `query` plugin from $nu.plugin-path diff --git a/commands/docs/polars.md b/commands/docs/polars.md index 74f6e88096f..e8bc81c07f4 100644 --- a/commands/docs/polars.md +++ b/commands/docs/polars.md @@ -2,7 +2,7 @@ title: polars categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Operate with data in a dataframe format. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the subcommands below. Using this command as-is will only produce this help message. @@ -53,122 +52,131 @@ 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 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 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 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 fetch`](/commands/docs/polars_fetch.md) | Collects the lazyframe to the selected rows. | 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 date. | 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 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-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 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 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 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 pivot`](/commands/docs/polars_pivot.md) | Pivot a DataFrame from wide to long format. | plugin | -| [`polars profile`](/commands/docs/polars_profile.md) | Profile a lazy dataframe. | 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) | Replace the leftmost (sub)string by a regex pattern. | plugin | -| [`polars replace-all`](/commands/docs/polars_replace-all.md) | Replace all (sub)strings by a regex pattern. | 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 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-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 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 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 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 fetch`](/commands/docs/polars_fetch.md) | Collects the lazyframe to the selected rows. | 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 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 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) | Replace the leftmost (sub)string by a regex pattern. | plugin | +| [`polars replace-all`](/commands/docs/polars_replace-all.md) | Replace all (sub)strings by a regex pattern. | 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 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-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 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 9f37955fbd3..424df5975e5 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.103.0 +version: 0.104.0 dataframe: | Creates an agg_groups expression. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Get the group index of the group by operations. diff --git a/commands/docs/polars_agg.md b/commands/docs/polars_agg.md index 75777cb7a79..cb30e8e7544 100644 --- a/commands/docs/polars_agg.md +++ b/commands/docs/polars_agg.md @@ -2,7 +2,7 @@ title: polars agg categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Performs a series of aggregations from a group-by. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Group by and perform an aggregation @@ -60,3 +59,24 @@ Group by and perform an aggregation ╰───┴───┴───────┴───────┴───────╯ ``` + +Group by and perform an aggregation using a record +```nu +> [[a b]; [1 2] [1 4] [2 6] [2 4]] + | polars into-lazy + | polars group-by a + | polars agg { + b_min: (polars col b | polars min) + b_max: (polars col b | polars max) + b_sum: (polars col b | polars sum) + } + | polars collect + | polars sort-by a +╭───┬───┬───────┬───────┬───────╮ +│ # │ a │ b_min │ b_max │ b_sum │ +├───┼───┼───────┼───────┼───────┤ +│ 0 │ 1 │ 2 │ 4 │ 6 │ +│ 1 │ 2 │ 4 │ 6 │ 10 │ +╰───┴───┴───────┴───────┴───────╯ + +``` diff --git a/commands/docs/polars_all-false.md b/commands/docs/polars_all-false.md index ece646ce463..b63b73260bb 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.103.0 +version: 0.104.0 dataframe: | Returns true if all values are false. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns true if all values are false diff --git a/commands/docs/polars_all-true.md b/commands/docs/polars_all-true.md index a68b32c99fe..d4f4373509e 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.103.0 +version: 0.104.0 dataframe: | Returns true if all values are true. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns true if all values are true diff --git a/commands/docs/polars_append.md b/commands/docs/polars_append.md index 481b549bd44..2d8292e0181 100644 --- a/commands/docs/polars_append.md +++ b/commands/docs/polars_append.md @@ -2,7 +2,7 @@ title: polars append categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Appends a new dataframe. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Appends a dataframe as new columns diff --git a/commands/docs/polars_arg-max.md b/commands/docs/polars_arg-max.md index a48ff22a885..8c8cb1ca800 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.103.0 +version: 0.104.0 dataframe: | Return index for max value in series. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns index for max value diff --git a/commands/docs/polars_arg-min.md b/commands/docs/polars_arg-min.md index af2c0ca8b13..21a0ae373df 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.103.0 +version: 0.104.0 dataframe: | Return index for min value in series. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns index for min value diff --git a/commands/docs/polars_arg-sort.md b/commands/docs/polars_arg-sort.md index 14d86bd0994..337e7a85b7b 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.103.0 +version: 0.104.0 dataframe: | Returns indexes for a sorted series. usage: | @@ -39,7 +39,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns indexes for a sorted series diff --git a/commands/docs/polars_arg-true.md b/commands/docs/polars_arg-true.md index f218e8cc833..17147061ea8 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.103.0 +version: 0.104.0 dataframe: | Returns indexes where values are true. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns indexes where values are true diff --git a/commands/docs/polars_arg-unique.md b/commands/docs/polars_arg-unique.md index 8c9269a4a22..4161637969c 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.103.0 +version: 0.104.0 dataframe: | Returns indexes for unique values. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns indexes for unique values diff --git a/commands/docs/polars_arg-where.md b/commands/docs/polars_arg-where.md index 111c7b7a991..7477418a4df 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.103.0 +version: 0.104.0 expression: | Creates an expression that returns the arguments where expression is true. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Return a dataframe where the value match the expression diff --git a/commands/docs/polars_as-date.md b/commands/docs/polars_as-date.md index c60b3ca167a..78526d404c0 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.103.0 +version: 0.104.0 dataframe: | Converts string to date. usage: | @@ -41,19 +41,50 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Converts string to date ```nu > ["2021-12-30" "2021-12-31"] | polars into-df | polars as-date "%Y-%m-%d" +╭───┬─────────────╮ +│ # │ date │ +├───┼─────────────┤ +│ 0 │ 3 years ago │ +│ 1 │ 3 years ago │ +╰───┴─────────────╯ ``` Converts string to date ```nu > ["2021-12-30" "2021-12-31 21:00:00"] | polars into-df | polars as-date "%Y-%m-%d" --not-exact +╭───┬─────────────╮ +│ # │ date │ +├───┼─────────────┤ +│ 0 │ 3 years ago │ +│ 1 │ 3 years ago │ +╰───┴─────────────╯ + +``` + +Converts string to date in an expression +```nu +> ["2021-12-30" "2021-12-31 21:00:00"] | polars into-lazy | polars select (polars col 0 | polars as-date "%Y-%m-%d" --not-exact) +╭───┬─────────────╮ +│ # │ date │ +├───┼─────────────┤ +│ 0 │ 3 years ago │ +│ 1 │ 3 years ago │ +╰───┴─────────────╯ + +``` +Output is of date type +```nu +> ["2021-12-30" "2021-12-31 21:00:00"] | polars into-df | polars as-date "%Y-%m-%d" --not-exact | polars schema +╭──────┬──────╮ +│ date │ date │ +╰──────┴──────╯ ``` ## Notes diff --git a/commands/docs/polars_as-datetime.md b/commands/docs/polars_as-datetime.md index 5943dce0e20..c5847209c28 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.103.0 +version: 0.104.0 dataframe: | Converts string to datetime. usage: | @@ -30,6 +30,13 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Flags - `--not-exact, -n`: the format string may be contained in the date (e.g. foo-2021-01-01-bar could match 2021-01-01) + - `--naive`: the input datetimes should be parsed as naive (i.e., not timezone-aware). Ignored if input is an expression. + - `--ambiguous, -a {one_of(string, nothing)}`: Determine how to deal with ambiguous datetimes: + `raise` (default): raise error + `earliest`: use the earliest datetime + `latest`: use the latest datetime + `null`: set to null + Used only when input is a lazyframe or expression and ignored otherwise ## Parameters @@ -41,12 +48,11 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Converts string to datetime ```nu -> ["2021-12-30 00:00:00" "2021-12-31 00:00:00"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S" +> ["2021-12-30 00:00:00 -0400" "2021-12-31 00:00:00 -0400"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S %z" ╭───┬─────────────╮ │ # │ datetime │ ├───┼─────────────┤ @@ -58,7 +64,7 @@ Converts string to datetime Converts string to datetime with high resolutions ```nu -> ["2021-12-30 00:00:00.123456789" "2021-12-31 00:00:00.123456789"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S.%9f" +> ["2021-12-30 00:00:00.123456789" "2021-12-31 00:00:00.123456789"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S.%9f" --naive ╭───┬─────────────╮ │ # │ datetime │ ├───┼─────────────┤ @@ -70,7 +76,7 @@ Converts string to datetime with high resolutions Converts string to datetime using the `--not-exact` flag even with excessive symbols ```nu -> ["2021-12-30 00:00:00 GMT+4"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S" --not-exact +> ["2021-12-30 00:00:00 GMT+4"] | polars into-df | polars as-datetime "%Y-%m-%d %H:%M:%S" --not-exact --naive ╭───┬─────────────╮ │ # │ datetime │ ├───┼─────────────┤ @@ -79,6 +85,20 @@ Converts string to datetime using the `--not-exact` flag even with excessive sym ``` +Converts string to datetime using the `--not-exact` flag even with excessive symbols in an expression +```nu +> ["2025-11-02 00:00:00", "2025-11-02 01:00:00", "2025-11-02 02:00:00", "2025-11-02 03:00:00"] | polars into-df | polars select (polars col 0 | polars as-datetime "%Y-%m-%d %H:%M:%S") +╭───┬─────────────╮ +│ # │ datetime │ +├───┼─────────────┤ +│ 0 │ in 6 months │ +│ 1 │ in 6 months │ +│ 2 │ in 6 months │ +│ 3 │ in 6 months │ +╰───┴─────────────╯ + +``` + ## Notes Format example: "%y/%m/%d %H:%M:%S" => 21/12/31 12:54:98 diff --git a/commands/docs/polars_as.md b/commands/docs/polars_as.md index d46ec0a4a5f..769dfb8ae6f 100644 --- a/commands/docs/polars_as.md +++ b/commands/docs/polars_as.md @@ -2,7 +2,7 @@ title: polars as categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Creates an alias expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates and alias expression diff --git a/commands/docs/polars_cache.md b/commands/docs/polars_cache.md index 8e7f6f239fe..04508153b33 100644 --- a/commands/docs/polars_cache.md +++ b/commands/docs/polars_cache.md @@ -2,7 +2,7 @@ title: polars cache categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Caches operations in a new LazyFrame. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Caches the result into a new LazyFrame diff --git a/commands/docs/polars_cast.md b/commands/docs/polars_cast.md index ecf5e20b9de..56b90b82144 100644 --- a/commands/docs/polars_cast.md +++ b/commands/docs/polars_cast.md @@ -2,7 +2,7 @@ title: polars cast categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Cast a column to a different dtype. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Cast a column in a dataframe to a different dtype diff --git a/commands/docs/polars_col.md b/commands/docs/polars_col.md index cf78ce457fc..7188c99a473 100644 --- a/commands/docs/polars_col.md +++ b/commands/docs/polars_col.md @@ -2,7 +2,7 @@ title: polars col categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Creates a named column expression. usage: | @@ -25,11 +25,16 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Signature -```> polars col {flags} (column name)``` +```> polars col {flags} (column name) ...rest``` + +## Flags + + - `--type, -t`: Treat column names as type names ## Parameters - `column name`: Name of column to be used. '*' can be used for all columns. + - `...rest`: Additional columns to be used. Cannot be '*' ## Input/output types: @@ -37,7 +42,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates a named column expression and converts it to a nu object @@ -61,3 +65,25 @@ Select all columns using the asterisk wildcard. ╰───┴───┴───╯ ``` + +Select multiple columns (cannot be used with asterisk wildcard) +```nu +> [[a b c]; [x 1 1.1] [y 2 2.2] [z 3 3.3]] | polars into-df | polars select (polars col b c | polars sum) | polars collect +╭───┬───┬──────╮ +│ # │ b │ c │ +├───┼───┼──────┤ +│ 0 │ 6 │ 6.60 │ +╰───┴───┴──────╯ + +``` + +Select multiple columns by types (cannot be used with asterisk wildcard) +```nu +> [[a b c]; [x o 1.1] [y p 2.2] [z q 3.3]] | polars into-df | polars select (polars col str f64 --type | polars max) | polars collect +╭───┬───┬───┬──────╮ +│ # │ a │ b │ c │ +├───┼───┼───┼──────┤ +│ 0 │ z │ q │ 3.30 │ +╰───┴───┴───┴──────╯ + +``` diff --git a/commands/docs/polars_collect.md b/commands/docs/polars_collect.md index a4cd64f4ac5..c45bfc4dec2 100644 --- a/commands/docs/polars_collect.md +++ b/commands/docs/polars_collect.md @@ -2,7 +2,7 @@ title: polars collect categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Collect lazy dataframe into eager dataframe. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples drop duplicates diff --git a/commands/docs/polars_columns.md b/commands/docs/polars_columns.md index 7f9d7c89f26..828d743c02c 100644 --- a/commands/docs/polars_columns.md +++ b/commands/docs/polars_columns.md @@ -2,7 +2,7 @@ title: polars columns categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Show dataframe columns. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Dataframe columns diff --git a/commands/docs/polars_concat-str.md b/commands/docs/polars_concat-str.md index 853f8b7095d..0c2353e5129 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.103.0 +version: 0.104.0 expression: | Creates a concat string expression. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates a concat string expression diff --git a/commands/docs/polars_concat.md b/commands/docs/polars_concat.md index cc74ebd50d8..478a7f1aae9 100644 --- a/commands/docs/polars_concat.md +++ b/commands/docs/polars_concat.md @@ -2,7 +2,7 @@ title: polars concat categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Concatenate two or more dataframes. usage: | @@ -46,7 +46,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Concatenates two dataframes with the dataframe in the pipeline. diff --git a/commands/docs/polars_contains.md b/commands/docs/polars_contains.md index 781718a1a04..09a14c47055 100644 --- a/commands/docs/polars_contains.md +++ b/commands/docs/polars_contains.md @@ -2,7 +2,7 @@ title: polars contains categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Checks if a pattern is contained in a string. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns boolean indicating if pattern was found in a column diff --git a/commands/docs/polars_convert-time-zone.md b/commands/docs/polars_convert-time-zone.md new file mode 100644 index 00000000000..e17ba7a86f2 --- /dev/null +++ b/commands/docs/polars_convert-time-zone.md @@ -0,0 +1,68 @@ +--- +title: polars convert-time-zone +categories: | + dataframe +version: 0.104.0 +dataframe: | + Convert datetime to target timezone. +usage: | + Convert datetime to target timezone. +editLink: false +contributors: false +--- + + +# `polars convert-time-zone` for [dataframe](/commands/categories/dataframe.md) + +
Convert datetime to target timezone.
+ +::: warning This command requires a plugin +The `polars convert-time-zone` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars convert-time-zone {flags} (time_zone)``` + +## Parameters + + - `time_zone`: Timezone for the Datetime Series. Pass `null` to unset time zone. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Convert timezone for timezone-aware datetime +```nu +> ["2025-04-10 09:30:00 -0400" "2025-04-10 10:30:00 -0400"] | polars into-df + | polars as-datetime "%Y-%m-%d %H:%M:%S %z" + | polars select (polars col datetime | polars convert-time-zone "Europe/Lisbon") +╭───┬─────────────╮ +│ # │ datetime │ +├───┼─────────────┤ +│ 0 │ 2 weeks ago │ +│ 1 │ 2 weeks ago │ +╰───┴─────────────╯ + +``` + +Timezone conversions for timezone-naive datetime will assume the original timezone is UTC +```nu +> ["2025-04-10 09:30:00" "2025-04-10 10:30:00"] | polars into-df + | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive + | polars select (polars col datetime | polars convert-time-zone "America/New_York") +╭───┬─────────────╮ +│ # │ datetime │ +├───┼─────────────┤ +│ 0 │ 2 weeks ago │ +│ 1 │ 2 weeks ago │ +╰───┴─────────────╯ + +``` diff --git a/commands/docs/polars_count-null.md b/commands/docs/polars_count-null.md index acf83892298..0c4f50507c0 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.103.0 +version: 0.104.0 dataframe: | Counts null values. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Counts null values diff --git a/commands/docs/polars_count.md b/commands/docs/polars_count.md index c5c396abc5c..efad4fb2163 100644 --- a/commands/docs/polars_count.md +++ b/commands/docs/polars_count.md @@ -2,7 +2,7 @@ title: polars count categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Returns the number of non-null values in the column. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Count the number of non-null values in a column diff --git a/commands/docs/polars_cumulative.md b/commands/docs/polars_cumulative.md index 0dce51c512b..6e262c12854 100644 --- a/commands/docs/polars_cumulative.md +++ b/commands/docs/polars_cumulative.md @@ -2,7 +2,7 @@ title: polars cumulative categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Cumulative calculation for a column or series. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Cumulative sum for a column diff --git a/commands/docs/polars_cut.md b/commands/docs/polars_cut.md new file mode 100644 index 00000000000..f2c6bde51e5 --- /dev/null +++ b/commands/docs/polars_cut.md @@ -0,0 +1,52 @@ +--- +title: polars cut +categories: | + dataframe +version: 0.104.0 +dataframe: | + Bin continuous values into discrete categories for a series. +usage: | + Bin continuous values into discrete categories for a series. +editLink: false +contributors: false +--- + + +# `polars cut` for [dataframe](/commands/categories/dataframe.md) + +
Bin continuous values into discrete categories for a series.
+ +::: warning This command requires a plugin +The `polars cut` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars cut {flags} (breaks)``` + +## Flags + + - `--labels, -l {list}`: Names of the categories. The number of labels must be equal to the number of cut points plus one. + - `--left_closed, -c`: Set the intervals to be left-closed instead of right-closed. + - `--include_breaks, -b`: Include a column with the right endpoint of the bin each observation falls in. This will change the data type of the output from a Categorical to a Struct. + +## Parameters + + - `breaks`: Dataframe that contains a series of unique cut points. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Divide the column into three categories. +```nu +> [-2, -1, 0, 1, 2] | polars into-df | polars cut [-1, 1] --labels ["a", "b", "c"] + +``` diff --git a/commands/docs/polars_datepart.md b/commands/docs/polars_datepart.md index 39665ae2d9c..4ddd1270f99 100644 --- a/commands/docs/polars_datepart.md +++ b/commands/docs/polars_datepart.md @@ -2,7 +2,7 @@ title: polars datepart categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Creates an expression for capturing the specified datepart in a column. usage: | @@ -37,12 +37,11 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates an expression to capture the year date part ```nu -> [["2021-12-30T01:02:03.123456789"]] | polars into-df | polars as-datetime "%Y-%m-%dT%H:%M:%S.%9f" | polars with-column [(polars col datetime | polars datepart year | polars as datetime_year )] +> [["2021-12-30T01:02:03.123456789"]] | polars into-df | polars as-datetime "%Y-%m-%dT%H:%M:%S.%9f" --naive | polars with-column [(polars col datetime | polars datepart year | polars as datetime_year )] ╭───┬─────────────┬───────────────╮ │ # │ datetime │ datetime_year │ ├───┼─────────────┼───────────────┤ @@ -53,7 +52,7 @@ Creates an expression to capture the year date part Creates an expression to capture multiple date parts ```nu -> [["2021-12-30T01:02:03.123456789"]] | polars into-df | polars as-datetime "%Y-%m-%dT%H:%M:%S.%9f" | +> [["2021-12-30T01:02:03.123456789"]] | polars into-df | polars as-datetime "%Y-%m-%dT%H:%M:%S.%9f" --naive | polars with-column [ (polars col datetime | polars datepart year | polars as datetime_year ), (polars col datetime | polars datepart month | polars as datetime_month ), (polars col datetime | polars datepart day | polars as datetime_day ), @@ -61,10 +60,15 @@ Creates an expression to capture multiple date parts (polars col datetime | polars datepart minute | polars as datetime_minute ), (polars col datetime | polars datepart second | polars as datetime_second ), (polars col datetime | polars datepart nanosecond | polars as datetime_ns ) ] -╭───┬─────────────┬───────────────┬────────────────┬──────────────┬───────────────┬─────────────────┬─────────────────┬─────────────╮ -│ # │ datetime │ datetime_year │ datetime_month │ datetime_day │ datetime_hour │ datetime_minute │ datetime_second │ datetime_ns │ -├───┼─────────────┼───────────────┼────────────────┼──────────────┼───────────────┼─────────────────┼─────────────────┼─────────────┤ -│ 0 │ 3 years ago │ 2021 │ 12 │ 30 │ 1 │ 2 │ 3 │ 123456789 │ -╰───┴─────────────┴───────────────┴────────────────┴──────────────┴───────────────┴─────────────────┴─────────────────┴─────────────╯ +╭───┬─────────────┬───────────────┬────────────────┬──────────────┬───────────────┬─────────────────┬───────────┬─────╮ +│ # │ datetime │ datetime_year │ datetime_month │ datetime_day │ datetime_hour │ datetime_minute │ datetime_ │ dat │ +│ │ │ │ │ │ │ │ second │ eti │ +│ │ │ │ │ │ │ │ │ me_ │ +│ │ │ │ │ │ │ │ │ ns │ +├───┼─────────────┼───────────────┼────────────────┼──────────────┼───────────────┼─────────────────┼───────────┼─────┤ +│ 0 │ 3 years ago │ 2021 │ 12 │ 30 │ 1 │ 2 │ 3 │ 123 │ +│ │ │ │ │ │ │ │ │ 456 │ +│ │ │ │ │ │ │ │ │ 789 │ +╰───┴─────────────┴───────────────┴────────────────┴──────────────┴───────────────┴─────────────────┴───────────┴─────╯ ``` diff --git a/commands/docs/polars_decimal.md b/commands/docs/polars_decimal.md index 15272e4b9f6..b6f18fc69d8 100644 --- a/commands/docs/polars_decimal.md +++ b/commands/docs/polars_decimal.md @@ -2,7 +2,7 @@ title: polars decimal categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Converts a string column into a decimal column usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Modifies strings to decimal diff --git a/commands/docs/polars_drop-duplicates.md b/commands/docs/polars_drop-duplicates.md index e6254ee9ed6..1e3e80a0c69 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.103.0 +version: 0.104.0 dataframe: | Drops duplicate values in dataframe. usage: | @@ -42,7 +42,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples drop duplicates diff --git a/commands/docs/polars_drop-nulls.md b/commands/docs/polars_drop-nulls.md index a9d4fc8e733..5d262dc3e89 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.103.0 +version: 0.104.0 dataframe: | Drops null values in dataframe. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples drop null values in dataframe diff --git a/commands/docs/polars_drop.md b/commands/docs/polars_drop.md index 1de83043ac7..3aa36583d61 100644 --- a/commands/docs/polars_drop.md +++ b/commands/docs/polars_drop.md @@ -2,7 +2,7 @@ title: polars drop categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a new dataframe by dropping the selected columns. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples drop column a diff --git a/commands/docs/polars_dummies.md b/commands/docs/polars_dummies.md index 4bd08cbea8d..ee9a3522f5b 100644 --- a/commands/docs/polars_dummies.md +++ b/commands/docs/polars_dummies.md @@ -2,7 +2,7 @@ title: polars dummies categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a new dataframe with dummy variables. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create new dataframe with dummy variables from a dataframe diff --git a/commands/docs/polars_explode.md b/commands/docs/polars_explode.md index 08b4334094e..2c10752d887 100644 --- a/commands/docs/polars_explode.md +++ b/commands/docs/polars_explode.md @@ -2,7 +2,7 @@ title: polars explode categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Explodes a dataframe or creates a explode expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Explode the specified dataframe diff --git a/commands/docs/polars_expr-not.md b/commands/docs/polars_expr-not.md index d00bec4fae5..bd05d9450a6 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.103.0 +version: 0.104.0 dataframe: | Creates a not expression. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates a not expression diff --git a/commands/docs/polars_fetch.md b/commands/docs/polars_fetch.md index 08730cc178d..66636252b47 100644 --- a/commands/docs/polars_fetch.md +++ b/commands/docs/polars_fetch.md @@ -2,7 +2,7 @@ title: polars fetch categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Collects the lazyframe to the selected rows. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Fetch a rows from the dataframe diff --git a/commands/docs/polars_fill-nan.md b/commands/docs/polars_fill-nan.md index b6c92d0b1da..64e00bd415e 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.103.0 +version: 0.104.0 lazyframe: | Replaces NaN values with the given expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Fills the NaN values with 0 diff --git a/commands/docs/polars_fill-null.md b/commands/docs/polars_fill-null.md index 4667249bf21..81c9819297a 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.103.0 +version: 0.104.0 lazyframe: | Replaces NULL values with the given expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Fills the null values by 0 diff --git a/commands/docs/polars_filter-with.md b/commands/docs/polars_filter-with.md index 0205ce12c39..28b3b83a883 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.103.0 +version: 0.104.0 dataframe_or_lazyframe: | Filters dataframe using a mask or expression as reference. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Filter dataframe using a bool mask diff --git a/commands/docs/polars_filter.md b/commands/docs/polars_filter.md index cd9520d81d0..7e1e1c41e6c 100644 --- a/commands/docs/polars_filter.md +++ b/commands/docs/polars_filter.md @@ -2,7 +2,7 @@ title: polars filter categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Filter dataframe based in expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Filter dataframe using an expression @@ -51,3 +50,15 @@ Filter dataframe using an expression ╰───┴───┴───╯ ``` + +Filter dataframe for rows where dt is within the last 2 days of the maximum dt value +```nu +> [[dt val]; [2025-04-01 1] [2025-04-02 2] [2025-04-03 3] [2025-04-04 4]] | polars into-df | polars filter ((polars col dt) > ((polars col dt | polars max | $in - 2day))) +╭───┬─────────────┬─────╮ +│ # │ dt │ val │ +├───┼─────────────┼─────┤ +│ 0 │ 3 weeks ago │ 3 │ +│ 1 │ 3 weeks ago │ 4 │ +╰───┴─────────────┴─────╯ + +``` diff --git a/commands/docs/polars_first.md b/commands/docs/polars_first.md index 17674e43d1c..7d7cbcd380e 100644 --- a/commands/docs/polars_first.md +++ b/commands/docs/polars_first.md @@ -2,7 +2,7 @@ title: polars first categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Show only the first number of rows or create a first expression usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Return the first row of a dataframe diff --git a/commands/docs/polars_flatten.md b/commands/docs/polars_flatten.md index 6027dd2ebe1..7eeb4cd03e9 100644 --- a/commands/docs/polars_flatten.md +++ b/commands/docs/polars_flatten.md @@ -2,7 +2,7 @@ title: polars flatten categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | An alias for polars explode. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Flatten the specified dataframe diff --git a/commands/docs/polars_get-day.md b/commands/docs/polars_get-day.md index 0c382612dbc..a9411a71851 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.103.0 +version: 0.104.0 dataframe: | Gets day from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns day from a date @@ -49,3 +48,17 @@ Returns day from a date ╰───┴───╯ ``` + +Returns day from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-day) +╭───┬───╮ +│ # │ 0 │ +├───┼───┤ +│ 0 │ 4 │ +│ 1 │ 4 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_get-hour.md b/commands/docs/polars_get-hour.md index 29bb00ab2e9..39d3dea1bdb 100644 --- a/commands/docs/polars_get-hour.md +++ b/commands/docs/polars_get-hour.md @@ -2,11 +2,11 @@ title: polars get-hour categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | - Gets hour from date. + Gets hour from datetime. usage: | - Gets hour from date. + Gets hour from datetime. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `polars get-hour` for [dataframe](/commands/categories/dataframe.md) -
Gets hour from date.
+
Gets hour from datetime.
::: warning This command requires a plugin The `polars get-hour` command resides in the `polars` plugin. @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns hour from a date @@ -49,3 +48,31 @@ Returns hour from a date ╰───┴────╯ ``` + +Returns hour from a date in a lazyframe +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-lazy); + $df | polars get-hour +╭───┬────╮ +│ # │ 0 │ +├───┼────┤ +│ 0 │ 16 │ +│ 1 │ 16 │ +╰───┴────╯ + +``` + +Returns hour from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-hour) +╭───┬────╮ +│ # │ 0 │ +├───┼────┤ +│ 0 │ 16 │ +│ 1 │ 16 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_get-minute.md b/commands/docs/polars_get-minute.md index ca4050b1807..cc66ded22b1 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.103.0 +version: 0.104.0 dataframe: | Gets minute from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns minute from a date @@ -49,3 +48,17 @@ Returns minute from a date ╰───┴────╯ ``` + +Returns minute from a date +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-minute) +╭───┬────╮ +│ # │ 0 │ +├───┼────┤ +│ 0 │ 39 │ +│ 1 │ 39 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_get-month.md b/commands/docs/polars_get-month.md index be14977d3e5..ca0057b4544 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.103.0 +version: 0.104.0 dataframe: | Gets month from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns month from a date @@ -49,3 +48,17 @@ Returns month from a date ╰───┴───╯ ``` + +Returns month from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-month) +╭───┬───╮ +│ # │ 0 │ +├───┼───┤ +│ 0 │ 8 │ +│ 1 │ 8 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_get-nanosecond.md b/commands/docs/polars_get-nanosecond.md index bfacfe96113..e3fdcdf1f7a 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.103.0 +version: 0.104.0 dataframe: | Gets nanosecond from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns nanosecond from a date @@ -49,3 +48,17 @@ Returns nanosecond from a date ╰───┴───╯ ``` + +Returns nanosecond from a date +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-nanosecond) +╭───┬───╮ +│ # │ 0 │ +├───┼───┤ +│ 0 │ 0 │ +│ 1 │ 0 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_get-ordinal.md b/commands/docs/polars_get-ordinal.md index 97cc0a1ed47..b059d9a5ab6 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.103.0 +version: 0.104.0 dataframe: | Gets ordinal from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns ordinal from a date @@ -49,3 +48,17 @@ Returns ordinal from a date ╰───┴─────╯ ``` + +Returns ordinal from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-ordinal) +╭───┬─────╮ +│ # │ 0 │ +├───┼─────┤ +│ 0 │ 217 │ +│ 1 │ 217 │ +╰───┴─────╯ + +``` diff --git a/commands/docs/polars_get-second.md b/commands/docs/polars_get-second.md index b5b94911f81..5f82ab39ff9 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.103.0 +version: 0.104.0 dataframe: | Gets second from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns second from a date @@ -49,3 +48,17 @@ Returns second from a date ╰───┴────╯ ``` + +Returns second from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-second) +╭───┬────╮ +│ # │ 0 │ +├───┼────┤ +│ 0 │ 18 │ +│ 1 │ 18 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_get-week.md b/commands/docs/polars_get-week.md index d36374212fa..3426aa9aa38 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.103.0 +version: 0.104.0 dataframe: | Gets week from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns week from a date @@ -49,3 +48,17 @@ Returns week from a date ╰───┴────╯ ``` + +Returns week from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-week) +╭───┬────╮ +│ # │ 0 │ +├───┼────┤ +│ 0 │ 32 │ +│ 1 │ 32 │ +╰───┴────╯ + +``` diff --git a/commands/docs/polars_get-weekday.md b/commands/docs/polars_get-weekday.md index a2b0b6720d9..25b9af51588 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.103.0 +version: 0.104.0 dataframe: | Gets weekday from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns weekday from a date @@ -49,3 +48,17 @@ Returns weekday from a date ╰───┴───╯ ``` + +Returns weekday from a date +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-weekday) +╭───┬───╮ +│ # │ 0 │ +├───┼───┤ +│ 0 │ 2 │ +│ 1 │ 2 │ +╰───┴───╯ + +``` diff --git a/commands/docs/polars_get-year.md b/commands/docs/polars_get-year.md index f0cf053d092..e4feec2b937 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.103.0 +version: 0.104.0 dataframe: | Gets year from date. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns year from a date @@ -49,3 +48,17 @@ Returns year from a date ╰───┴──────╯ ``` + +Returns year from a date in an expression +```nu +> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC'); + let df = ([$dt $dt] | polars into-df); + $df | polars select (polars col 0 | polars get-year) +╭───┬──────╮ +│ # │ 0 │ +├───┼──────┤ +│ 0 │ 2020 │ +│ 1 │ 2020 │ +╰───┴──────╯ + +``` diff --git a/commands/docs/polars_get.md b/commands/docs/polars_get.md index 9431e25f355..d3ea9c11d60 100644 --- a/commands/docs/polars_get.md +++ b/commands/docs/polars_get.md @@ -2,7 +2,7 @@ title: polars get categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates dataframe with the selected columns. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns the selected column diff --git a/commands/docs/polars_group-by.md b/commands/docs/polars_group-by.md index 475d07c12ac..552b3c0927b 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.103.0 +version: 0.104.0 lazyframe: | Creates a group-by object that can be used for other aggregations. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Group by and perform an aggregation @@ -60,3 +59,24 @@ Group by and perform an aggregation ╰───┴───┴───────┴───────┴───────╯ ``` + +Group by an expression and perform an aggregation +```nu +> [[a b]; [2025-04-01 1] [2025-04-02 2] [2025-04-03 3] [2025-04-04 4]] + | polars into-lazy + | polars group-by (polars col a | polars get-day | $in mod 2) + | polars agg [ + (polars col b | polars min | polars as "b_min") + (polars col b | polars max | polars as "b_max") + (polars col b | polars sum | polars as "b_sum") + ] + | polars collect + | polars sort-by a +╭───┬───┬───────┬───────┬───────╮ +│ # │ a │ b_min │ b_max │ b_sum │ +├───┼───┼───────┼───────┼───────┤ +│ 0 │ 0 │ 2 │ 4 │ 6 │ +│ 1 │ 1 │ 1 │ 3 │ 4 │ +╰───┴───┴───────┴───────┴───────╯ + +``` diff --git a/commands/docs/polars_implode.md b/commands/docs/polars_implode.md index e0c2070ba18..4270503ca70 100644 --- a/commands/docs/polars_implode.md +++ b/commands/docs/polars_implode.md @@ -2,7 +2,7 @@ title: polars implode categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Aggregates values into a list. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## 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 6a7808220ef..02527ac618c 100644 --- a/commands/docs/polars_integer.md +++ b/commands/docs/polars_integer.md @@ -2,7 +2,7 @@ title: polars integer categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Converts a string column into a integer column usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Modifies strings to integer diff --git a/commands/docs/polars_into-df.md b/commands/docs/polars_into-df.md index d2937952347..f973f655d3c 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.103.0 +version: 0.104.0 dataframe: | Converts a list, table or record into a dataframe. usage: | @@ -29,7 +29,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Flags - - `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files + - `--schema, -s {any}`: Polars Schema in format [{name: str}]. - `--as-columns, -c`: When input shape is record of lists, treat each list as column values. @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Takes a dictionary and creates a dataframe @@ -106,18 +105,18 @@ Takes a list of booleans and creates a dataframe Convert to a dataframe and provide a schema ```nu -> [[a b c]; [1 {d: [1 2 3]} [10 11 12] ]]| polars into-df -s {a: u8, b: {d: list}, c: list} -╭───┬───┬───────────────────┬────────────╮ -│ # │ a │ b │ c │ -├───┼───┼───────────────────┼────────────┤ -│ 0 │ 1 │ ╭───┬───────────╮ │ ╭───┬────╮ │ -│ │ │ │ │ ╭───┬───╮ │ │ │ 0 │ 10 │ │ -│ │ │ │ d │ │ 0 │ 1 │ │ │ │ 1 │ 11 │ │ -│ │ │ │ │ │ 1 │ 2 │ │ │ │ 2 │ 12 │ │ -│ │ │ │ │ │ 2 │ 3 │ │ │ ╰───┴────╯ │ -│ │ │ │ │ ╰───┴───╯ │ │ │ -│ │ │ ╰───┴───────────╯ │ │ -╰───┴───┴───────────────────┴────────────╯ +> [[a b c e]; [1 {d: [1 2 3]} [10 11 12] 1.618]]| polars into-df -s {a: u8, b: {d: list}, c: list, e: 'decimal<4,3>'} +╭───┬───┬───────────────────┬────────────┬──────╮ +│ # │ a │ b │ c │ e │ +├───┼───┼───────────────────┼────────────┼──────┤ +│ 0 │ 1 │ ╭───┬───────────╮ │ ╭───┬────╮ │ 1.62 │ +│ │ │ │ │ ╭───┬───╮ │ │ │ 0 │ 10 │ │ │ +│ │ │ │ d │ │ 0 │ 1 │ │ │ │ 1 │ 11 │ │ │ +│ │ │ │ │ │ 1 │ 2 │ │ │ │ 2 │ 12 │ │ │ +│ │ │ │ │ │ 2 │ 3 │ │ │ ╰───┴────╯ │ │ +│ │ │ │ │ ╰───┴───╯ │ │ │ │ +│ │ │ ╰───┴───────────╯ │ │ │ +╰───┴───┴───────────────────┴────────────┴──────╯ ``` @@ -132,3 +131,27 @@ Convert to a dataframe and provide a schema that adds a new column ╰───┴───┴─────┴───╯ ``` + +If a provided schema specifies a subset of columns, only those columns are selected +```nu +> [[a b]; [1 "foo"] [2 "bar"]] | polars into-df -s {a: str} +╭───┬───╮ +│ # │ a │ +├───┼───┤ +│ 0 │ 1 │ +│ 1 │ 2 │ +╰───┴───╯ + +``` + +Use a predefined schama +```nu +> let schema = {a: str, b: str}; [[a b]; [1 "foo"] [2 "bar"]] | polars into-df -s $schema +╭───┬───┬─────╮ +│ # │ a │ b │ +├───┼───┼─────┤ +│ 0 │ 1 │ foo │ +│ 1 │ 2 │ bar │ +╰───┴───┴─────╯ + +``` diff --git a/commands/docs/polars_into-dtype.md b/commands/docs/polars_into-dtype.md new file mode 100644 index 00000000000..9c58b323a4b --- /dev/null +++ b/commands/docs/polars_into-dtype.md @@ -0,0 +1,42 @@ +--- +title: polars into-dtype +categories: | + dataframe +version: 0.104.0 +dataframe: | + Convert a string to a specific datatype. +usage: | + Convert a string to a specific datatype. +editLink: false +contributors: false +--- + + +# `polars into-dtype` for [dataframe](/commands/categories/dataframe.md) + +
Convert a string to a specific datatype.
+ +::: warning This command requires a plugin +The `polars into-dtype` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars into-dtype {flags} ``` + + +## Input/output types: + +| input | output | +| ------ | ------ | +| string | any | +## Examples + +Convert a string to a specific datatype and back to a nu object +```nu +> 'i64' | polars into-dtype | polars into-nu +i64 +``` diff --git a/commands/docs/polars_into-lazy.md b/commands/docs/polars_into-lazy.md index 5fc14ebfd6a..8457dc70fd7 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.103.0 +version: 0.104.0 lazyframe: | Converts a dataframe into a lazy dataframe. usage: | @@ -29,7 +29,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. ## Flags - - `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files + - `--schema, -s {any}`: Polars Schema in format [{name: str}]. ## Input/output types: @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Takes a table and creates a lazyframe @@ -49,5 +48,19 @@ Takes a table and creates a lazyframe Takes a table, creates a lazyframe, assigns column 'b' type str, displays the schema ```nu > [[a b];[1 2] [3 4]] | polars into-lazy --schema {b: str} | polars schema +╭───┬─────╮ +│ b │ str │ +╰───┴─────╯ +``` + +Use a predefined schama +```nu +> let schema = {a: str, b: str}; [[a b]; [1 "foo"] [2 "bar"]] | polars into-lazy -s $schema +╭───┬───┬─────╮ +│ # │ a │ b │ +├───┼───┼─────┤ +│ 0 │ 1 │ foo │ +│ 1 │ 2 │ bar │ +╰───┴───┴─────╯ ``` diff --git a/commands/docs/polars_into-nu.md b/commands/docs/polars_into-nu.md index f22b6f896da..753cf19e69b 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.103.0 +version: 0.104.0 dataframe: | Converts a dataframe or an expression into nushell value for access and exploration. usage: | @@ -39,7 +39,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Shows head rows from dataframe diff --git a/commands/docs/polars_into-repr.md b/commands/docs/polars_into-repr.md index b93f4502e07..411a10fabd2 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.103.0 +version: 0.104.0 dataframe: | Display a dataframe in its repr format. usage: | @@ -33,33 +33,32 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | string | - ## Examples Shows dataframe in repr format ```nu > [[a b]; [2025-01-01 2] [2025-01-02 4]] | polars into-df | polars into-repr shape: (2, 2) -┌─────────────────────┬─────┐ -│ a ┆ b │ -│ --- ┆ --- │ -│ datetime[ns] ┆ i64 │ -╞═════════════════════╪═════╡ -│ 2025-01-01 00:00:00 ┆ 2 │ -│ 2025-01-02 00:00:00 ┆ 4 │ -└─────────────────────┴─────┘ +┌─────────────────────────┬─────┐ +│ a ┆ b │ +│ --- ┆ --- │ +│ datetime[ns, UTC] ┆ i64 │ +╞═════════════════════════╪═════╡ +│ 2025-01-01 00:00:00 UTC ┆ 2 │ +│ 2025-01-02 00:00:00 UTC ┆ 4 │ +└─────────────────────────┴─────┘ ``` Shows lazy dataframe in repr format ```nu -> [[a b]; [2025-01-01 2] [2025-01-02 4]] | polars into-df | polars into-lazy | polars into-repr +> [[a b]; [2025-01-01 2] [2025-01-02 4]] | polars into-lazy | polars into-repr shape: (2, 2) -┌─────────────────────┬─────┐ -│ a ┆ b │ -│ --- ┆ --- │ -│ datetime[ns] ┆ i64 │ -╞═════════════════════╪═════╡ -│ 2025-01-01 00:00:00 ┆ 2 │ -│ 2025-01-02 00:00:00 ┆ 4 │ -└─────────────────────┴─────┘ +┌─────────────────────────┬─────┐ +│ a ┆ b │ +│ --- ┆ --- │ +│ datetime[ns, UTC] ┆ i64 │ +╞═════════════════════════╪═════╡ +│ 2025-01-01 00:00:00 UTC ┆ 2 │ +│ 2025-01-02 00:00:00 UTC ┆ 4 │ +└─────────────────────────┴─────┘ ``` diff --git a/commands/docs/polars_into-schema.md b/commands/docs/polars_into-schema.md new file mode 100644 index 00000000000..2b30b36e757 --- /dev/null +++ b/commands/docs/polars_into-schema.md @@ -0,0 +1,45 @@ +--- +title: polars into-schema +categories: | + dataframe +version: 0.104.0 +dataframe: | + Convert a value to a polars schema object +usage: | + Convert a value to a polars schema object +editLink: false +contributors: false +--- + + +# `polars into-schema` for [dataframe](/commands/categories/dataframe.md) + +
Convert a value to a polars schema object
+ +::: warning This command requires a plugin +The `polars into-schema` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars into-schema {flags} ``` + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Convert a record into a schema and back to a nu object +```nu +> {a: str, b: u8} | polars into-schema | polars into-nu +╭───┬─────╮ +│ a │ str │ +│ b │ u8 │ +╰───┴─────╯ +``` diff --git a/commands/docs/polars_is-duplicated.md b/commands/docs/polars_is-duplicated.md index 5d77c92c4e0..bf218457a3b 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.103.0 +version: 0.104.0 dataframe: | Creates mask indicating duplicated values. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create mask indicating duplicated values diff --git a/commands/docs/polars_is-in.md b/commands/docs/polars_is-in.md index 956f3e7ad63..e69fe49645c 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.103.0 +version: 0.104.0 expression: | Creates an is-in expression or checks to see if the elements are contained in the right series usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates a is-in expression diff --git a/commands/docs/polars_is-not-null.md b/commands/docs/polars_is-not-null.md index 79c62d4a7e5..34c436213f4 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.103.0 +version: 0.104.0 dataframe: | Creates mask where value is not null. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create mask where values are not null diff --git a/commands/docs/polars_is-null.md b/commands/docs/polars_is-null.md index 644a355f86d..076836dea55 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.103.0 +version: 0.104.0 dataframe: | Creates mask where value is null. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create mask where values are null diff --git a/commands/docs/polars_is-unique.md b/commands/docs/polars_is-unique.md index dbe9f18162b..28dca3f6bf8 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.103.0 +version: 0.104.0 dataframe: | Creates mask indicating unique values. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create mask indicating unique values diff --git a/commands/docs/polars_join-where.md b/commands/docs/polars_join-where.md new file mode 100644 index 00000000000..2c10e285570 --- /dev/null +++ b/commands/docs/polars_join-where.md @@ -0,0 +1,56 @@ +--- +title: polars join-where +categories: | + lazyframe +version: 0.104.0 +lazyframe: | + Joins a lazy frame with other lazy frame based on conditions. +usage: | + Joins a lazy frame with other lazy frame based on conditions. +editLink: false +contributors: false +--- + + +# `polars join-where` for [lazyframe](/commands/categories/lazyframe.md) + +
Joins a lazy frame with other lazy frame based on conditions.
+ +::: warning This command requires a plugin +The `polars join-where` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars join-where {flags} (other) (condition)``` + +## Parameters + + - `other`: LazyFrame to join with + - `condition`: Condition + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Join two lazy dataframes with a condition +```nu +> let df_a = ([[name cash];[Alice 5] [Bob 10]] | polars into-lazy) + let df_b = ([[item price];[A 3] [B 7] [C 12]] | polars into-lazy) + $df_a | polars join-where $df_b ((polars col cash) > (polars col price)) | polars collect +╭───┬───────┬──────┬──────┬───────╮ +│ # │ name │ cash │ item │ price │ +├───┼───────┼──────┼──────┼───────┤ +│ 0 │ Bob │ 10 │ B │ 7 │ +│ 1 │ Bob │ 10 │ A │ 3 │ +│ 2 │ Alice │ 5 │ A │ 3 │ +╰───┴───────┴──────┴──────┴───────╯ + +``` diff --git a/commands/docs/polars_join.md b/commands/docs/polars_join.md index 6891d54d36c..2d771772371 100644 --- a/commands/docs/polars_join.md +++ b/commands/docs/polars_join.md @@ -2,7 +2,7 @@ title: polars join categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Joins a lazy frame with other lazy frame. usage: | @@ -48,7 +48,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Join two lazy dataframes diff --git a/commands/docs/polars_last.md b/commands/docs/polars_last.md index bd03a7467ff..57397bec545 100644 --- a/commands/docs/polars_last.md +++ b/commands/docs/polars_last.md @@ -2,7 +2,7 @@ title: polars last categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates new dataframe with tail rows or creates a last expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create new dataframe with last rows diff --git a/commands/docs/polars_len.md b/commands/docs/polars_len.md index 232d61a3802..f6e18bbe8a3 100644 --- a/commands/docs/polars_len.md +++ b/commands/docs/polars_len.md @@ -2,7 +2,7 @@ title: polars len categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Return the number of rows in the context. This is similar to COUNT(*) in SQL. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Count the number of rows in the the dataframe. diff --git a/commands/docs/polars_list-contains.md b/commands/docs/polars_list-contains.md index 44e18403d76..dc288f90461 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.103.0 +version: 0.104.0 dataframe: | Checks if an element is contained in a list. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns boolean indicating if a literal element was found in a list column diff --git a/commands/docs/polars_lit.md b/commands/docs/polars_lit.md index c90ac15405f..aefeb7e169e 100644 --- a/commands/docs/polars_lit.md +++ b/commands/docs/polars_lit.md @@ -2,7 +2,7 @@ title: polars lit categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Creates a literal expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Created a literal expression and converts it to a nu object @@ -48,3 +47,29 @@ Created a literal expression and converts it to a nu object │ value │ dyn int: 2 │ ╰───────┴────────────╯ ``` + +Create a literal expression from date +```nu +> polars lit 2025-04-13 | polars into-nu +╭──────────────┬──────────────────────────────────────────╮ +│ │ ╭───────┬──────────────────────────────╮ │ +│ expr │ │ expr │ literal │ │ +│ │ │ value │ dyn int: 1744502400000000000 │ │ +│ │ ╰───────┴──────────────────────────────╯ │ +│ dtype │ Datetime(Nanoseconds, None) │ +│ cast_options │ STRICT │ +╰──────────────┴──────────────────────────────────────────╯ +``` + +Create a literal expression from duration +```nu +> polars lit 3hr | polars into-nu +╭──────────────┬─────────────────────────────────────╮ +│ │ ╭───────┬─────────────────────────╮ │ +│ expr │ │ expr │ literal │ │ +│ │ │ value │ dyn int: 10800000000000 │ │ +│ │ ╰───────┴─────────────────────────╯ │ +│ dtype │ Duration(Nanoseconds) │ +│ cast_options │ STRICT │ +╰──────────────┴─────────────────────────────────────╯ +``` diff --git a/commands/docs/polars_lowercase.md b/commands/docs/polars_lowercase.md index fea77e19d46..90f1a6f4cdc 100644 --- a/commands/docs/polars_lowercase.md +++ b/commands/docs/polars_lowercase.md @@ -2,7 +2,7 @@ title: polars lowercase categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Lowercase the strings in the column. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Modifies strings in a column to lowercase diff --git a/commands/docs/polars_max.md b/commands/docs/polars_max.md index c3aa8870a68..ee88dbe7811 100644 --- a/commands/docs/polars_max.md +++ b/commands/docs/polars_max.md @@ -2,7 +2,7 @@ title: polars max categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a max expression or aggregates columns to their max value. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Max value from columns in a dataframe diff --git a/commands/docs/polars_mean.md b/commands/docs/polars_mean.md index 37ceaab476d..96dc1573b95 100644 --- a/commands/docs/polars_mean.md +++ b/commands/docs/polars_mean.md @@ -2,7 +2,7 @@ title: polars mean categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a mean expression for an aggregation or aggregates columns to their mean value. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Mean value from columns in a dataframe diff --git a/commands/docs/polars_median.md b/commands/docs/polars_median.md index 3ebd4c47b34..cf70e210aaf 100644 --- a/commands/docs/polars_median.md +++ b/commands/docs/polars_median.md @@ -2,7 +2,7 @@ title: polars median categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Median value from columns in a dataframe or creates expression for an aggregation usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Median aggregation for a group-by diff --git a/commands/docs/polars_min.md b/commands/docs/polars_min.md index ff230101b30..d4ae58b3e4d 100644 --- a/commands/docs/polars_min.md +++ b/commands/docs/polars_min.md @@ -2,7 +2,7 @@ title: polars min categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a min expression or aggregates columns to their min value. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Min value from columns in a dataframe diff --git a/commands/docs/polars_n-unique.md b/commands/docs/polars_n-unique.md index 95b83962e43..85544a8ef1b 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.103.0 +version: 0.104.0 dataframe: | Counts unique values. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Counts unique values diff --git a/commands/docs/polars_not.md b/commands/docs/polars_not.md index b14e84321e1..d6e3de8bfde 100644 --- a/commands/docs/polars_not.md +++ b/commands/docs/polars_not.md @@ -2,7 +2,7 @@ title: polars not categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Inverts boolean mask. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Inverts boolean mask diff --git a/commands/docs/polars_open.md b/commands/docs/polars_open.md index e5bac8ef874..f8cf91a3d1c 100644 --- a/commands/docs/polars_open.md +++ b/commands/docs/polars_open.md @@ -2,7 +2,7 @@ title: polars open categories: | dataframe -version: 0.103.0 +version: 0.104.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: | @@ -36,10 +36,10 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. - `--infer-schema {number}`: Number of rows to infer the schema of the file. CSV file - `--skip-rows {number}`: Number of rows to skip from file. CSV file - `--columns {list}`: Columns to be selected from csv file. CSV and Parquet file - - `--schema, -s {record}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files + - `--schema, -s {any}`: Polars Schema in format [{name: str}]. CSV, JSON, and JSONL files - `--hive-enabled`: Enable hive support. Parquet and Arrow files - `--hive-start-idx {number}`: Start index of hive partitioning. Parquet and Arrow files - - `--hive-schema {record}`: Hive schema in format [{name: str}]. Parquet and Arrow files + - `--hive-schema {any}`: Hive schema in format [{name: str}]. Parquet and Arrow files - `--hive-try-parse-dates`: Try to parse dates in hive partitioning. Parquet and Arrow files - `--truncate-ragged-lines`: Truncate lines that are longer than the schema. CSV file @@ -53,7 +53,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Takes a file name and creates a dataframe diff --git a/commands/docs/polars_otherwise.md b/commands/docs/polars_otherwise.md index 0d301966742..96cafbdc8cc 100644 --- a/commands/docs/polars_otherwise.md +++ b/commands/docs/polars_otherwise.md @@ -2,7 +2,7 @@ title: polars otherwise categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Completes a when expression. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create a when conditions diff --git a/commands/docs/polars_over.md b/commands/docs/polars_over.md new file mode 100644 index 00000000000..3c548161b97 --- /dev/null +++ b/commands/docs/polars_over.md @@ -0,0 +1,74 @@ +--- +title: polars over +categories: | + lazyframe +version: 0.104.0 +lazyframe: | + Compute expressions over a window group defined by partition expressions. +usage: | + Compute expressions over a window group defined by partition expressions. +editLink: false +contributors: false +--- + + +# `polars over` for [lazyframe](/commands/categories/lazyframe.md) + +
Compute expressions over a window group defined by partition expressions.
+ +::: warning This command requires a plugin +The `polars over` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars over {flags} ...rest``` + +## Parameters + + - `...rest`: Expression(s) that define the partition window + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Compute expression over an aggregation window +```nu +> [[a b]; [x 2] [x 4] [y 6] [y 4]] + | polars into-lazy + | polars select a (polars col b | polars cumulative sum | polars over a | polars as cum_b) + | polars collect +╭───┬───┬───────╮ +│ # │ a │ cum_b │ +├───┼───┼───────┤ +│ 0 │ x │ 2 │ +│ 1 │ x │ 6 │ +│ 2 │ y │ 6 │ +│ 3 │ y │ 10 │ +╰───┴───┴───────╯ + +``` + +Compute expression over an aggregation window where partitions are defined by expressions +```nu +> [[a b]; [x 2] [X 4] [Y 6] [y 4]] + | polars into-lazy + | polars select a (polars col b | polars cumulative sum | polars over (polars col a | polars lowercase) | polars as cum_b) + | polars collect +╭───┬───┬───────╮ +│ # │ a │ cum_b │ +├───┼───┼───────┤ +│ 0 │ x │ 2 │ +│ 1 │ X │ 6 │ +│ 2 │ Y │ 6 │ +│ 3 │ y │ 10 │ +╰───┴───┴───────╯ + +``` diff --git a/commands/docs/polars_pivot.md b/commands/docs/polars_pivot.md index 6a5a2e65bec..5802e9bacb1 100644 --- a/commands/docs/polars_pivot.md +++ b/commands/docs/polars_pivot.md @@ -2,11 +2,11 @@ title: polars pivot categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | - Pivot a DataFrame from wide to long format. + Pivot a DataFrame from long to wide format. usage: | - Pivot a DataFrame from wide to long format. + Pivot a DataFrame from long to wide format. editLink: false contributors: false --- @@ -14,7 +14,7 @@ contributors: false # `polars pivot` for [dataframe](/commands/categories/dataframe.md) -
Pivot a DataFrame from wide to long format.
+
Pivot a DataFrame from long to wide format.
::: warning This command requires a plugin The `polars pivot` command resides in the `polars` plugin. @@ -33,6 +33,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. - `--index, -i {list}`: column names for indexes - `--values, -v {list}`: column names used as value columns - `--aggregate, -a {string}`: Aggregation to apply when pivoting. The following are supported: first, sum, min, max, mean, median, count, last + - `--separator, -p {string}`: Delimiter in generated column names in case of multiple `values` columns (default '_') - `--sort, -s`: Sort columns - `--streamable, -t`: Whether or not to use the polars streaming engine. Only valid for lazy dataframes @@ -42,17 +43,28 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Perform a pivot in order to show individuals test score by subject ```nu -> [[name subject test_1 test_2]; [Cady maths 98 100] [Cady physics 99 100] [Karen maths 61 60] [Karen physics 58 60]] | polars into-df | polars pivot --on [subject] --index [name] --values [test_1] -╭───┬───────┬───────┬─────────╮ -│ # │ name │ maths │ physics │ -├───┼───────┼───────┼─────────┤ -│ 0 │ Cady │ 98 │ 99 │ -│ 1 │ Karen │ 61 │ 58 │ -╰───┴───────┴───────┴─────────╯ +> [[name subject date test_1 test_2]; [Cady maths 2025-04-01 98 100] [Cady physics 2025-04-01 99 100] [Karen maths 2025-04-02 61 60] [Karen physics 2025-04-02 58 60]] | polars into-df | polars pivot --on [subject] --index [name date] --values [test_1] +╭───┬───────┬─────────────┬───────┬─────────╮ +│ # │ name │ date │ maths │ physics │ +├───┼───────┼─────────────┼───────┼─────────┤ +│ 0 │ Cady │ 4 weeks ago │ 98 │ 99 │ +│ 1 │ Karen │ 3 weeks ago │ 61 │ 58 │ +╰───┴───────┴─────────────┴───────┴─────────╯ + +``` + +Perform a pivot with multiple `values` columns with a separator +```nu +> [[name subject date test_1 test_2 grade_1 grade_2]; [Cady maths 2025-04-01 98 100 A A] [Cady physics 2025-04-01 99 100 A A] [Karen maths 2025-04-02 61 60 D D] [Karen physics 2025-04-02 58 60 D D]] | polars into-df | polars pivot --on [subject] --index [name] --values [test_1 grade_1] --separator / +╭───┬───────┬──────────────┬────────────────┬───────────────┬─────────────────╮ +│ # │ name │ test_1/maths │ test_1/physics │ grade_1/maths │ grade_1/physics │ +├───┼───────┼──────────────┼────────────────┼───────────────┼─────────────────┤ +│ 0 │ Cady │ 98 │ 99 │ A │ A │ +│ 1 │ Karen │ 61 │ 58 │ D │ D │ +╰───┴───────┴──────────────┴────────────────┴───────────────┴─────────────────╯ ``` diff --git a/commands/docs/polars_profile.md b/commands/docs/polars_profile.md index fcba3c2299b..41aeac5f0d2 100644 --- a/commands/docs/polars_profile.md +++ b/commands/docs/polars_profile.md @@ -2,7 +2,7 @@ title: polars profile categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Profile a lazy dataframe. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Profile a lazy dataframe diff --git a/commands/docs/polars_qcut.md b/commands/docs/polars_qcut.md new file mode 100644 index 00000000000..1502ee925e2 --- /dev/null +++ b/commands/docs/polars_qcut.md @@ -0,0 +1,53 @@ +--- +title: polars qcut +categories: | + dataframe +version: 0.104.0 +dataframe: | + Bin continuous values into discrete categories based on their quantiles for a series. +usage: | + Bin continuous values into discrete categories based on their quantiles for a series. +editLink: false +contributors: false +--- + + +# `polars qcut` for [dataframe](/commands/categories/dataframe.md) + +
Bin continuous values into discrete categories based on their quantiles for a series.
+ +::: warning This command requires a plugin +The `polars qcut` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars qcut {flags} (quantiles)``` + +## Flags + + - `--labels, -l {list}`: Names of the categories. The number of labels must be equal to the number of cut points plus one. + - `--left_closed, -c`: Set the intervals to be left-closed instead of right-closed. + - `--include_breaks, -b`: Include a column with the right endpoint of the bin each observation falls in. This will change the data type of the output from a Categorical to a Struct. + - `--allow_duplicates, -d`: If set, duplicates in the resulting quantiles are dropped, rather than raising an error. This can happen even with unique probabilities, depending on the data. + +## Parameters + + - `quantiles`: Either a list of quantile probabilities between 0 and 1 or a positive integer determining the number of bins with uniform probability. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Divide a column into three categories according to pre-defined quantile probabilities. +```nu +> [-2, -1, 0, 1, 2] | polars into-df | polars qcut [0.25, 0.75] --labels ["a", "b", "c"] + +``` diff --git a/commands/docs/polars_quantile.md b/commands/docs/polars_quantile.md index 7110a10b0b0..b0d3327d0d8 100644 --- a/commands/docs/polars_quantile.md +++ b/commands/docs/polars_quantile.md @@ -2,7 +2,7 @@ title: polars quantile categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Aggregates the columns to the selected quantile. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples quantile value from columns in a dataframe diff --git a/commands/docs/polars_query.md b/commands/docs/polars_query.md index 1a778cc2bd9..be2c5ca3817 100644 --- a/commands/docs/polars_query.md +++ b/commands/docs/polars_query.md @@ -2,7 +2,7 @@ title: polars query categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Query dataframe using SQL diff --git a/commands/docs/polars_rename.md b/commands/docs/polars_rename.md index f0c6bac315a..98e75dded9b 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.103.0 +version: 0.104.0 dataframe_or_lazyframe: | Rename a dataframe column. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Renames a series diff --git a/commands/docs/polars_replace-all.md b/commands/docs/polars_replace-all.md index 12589bfac08..346120b22a3 100644 --- a/commands/docs/polars_replace-all.md +++ b/commands/docs/polars_replace-all.md @@ -2,7 +2,7 @@ title: polars replace-all categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Replace all (sub)strings by a regex pattern. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Replaces string in a column diff --git a/commands/docs/polars_replace-time-zone.md b/commands/docs/polars_replace-time-zone.md new file mode 100644 index 00000000000..94a2dc31a5b --- /dev/null +++ b/commands/docs/polars_replace-time-zone.md @@ -0,0 +1,97 @@ +--- +title: polars replace-time-zone +categories: | + dataframe +version: 0.104.0 +dataframe: | + Replace the timezone information in a datetime column. +usage: | + Replace the timezone information in a datetime column. +editLink: false +contributors: false +--- + + +# `polars replace-time-zone` for [dataframe](/commands/categories/dataframe.md) + +
Replace the timezone information in a datetime column.
+ +::: warning This command requires a plugin +The `polars replace-time-zone` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars replace-time-zone {flags} (time_zone)``` + +## Flags + + - `--ambiguous, -a {one_of(string, nothing)}`: Determine how to deal with ambiguous datetimes: + `raise` (default): raise error + `earliest`: use the earliest datetime + `latest`: use the latest datetime + `null`: set to null + - `--nonexistent, -n {one_of(string, nothing)}`: Determine how to deal with non-existent datetimes: raise (default) or null. + +## Parameters + + - `time_zone`: Timezone for the Datetime Series. Pass `null` to unset time zone. + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +Apply timezone to a naive datetime +```nu +> ["2021-12-30 00:00:00" "2021-12-31 00:00:00"] | polars into-df + | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive + | polars select (polars col datetime | polars replace-time-zone "America/New_York") +╭───┬─────────────╮ +│ # │ datetime │ +├───┼─────────────┤ +│ 0 │ 3 years ago │ +│ 1 │ 3 years ago │ +╰───┴─────────────╯ + +``` + +Apply timezone with ambiguous datetime +```nu +> ["2025-11-02 00:00:00", "2025-11-02 01:00:00", "2025-11-02 02:00:00", "2025-11-02 03:00:00"] + | polars into-df + | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive + | polars select (polars col datetime | polars replace-time-zone "America/New_York" --ambiguous null) +╭───┬─────────────╮ +│ # │ datetime │ +├───┼─────────────┤ +│ 0 │ in 6 months │ +│ 1 │ │ +│ 2 │ in 6 months │ +│ 3 │ in 6 months │ +╰───┴─────────────╯ + +``` + +Apply timezone with nonexistent datetime +```nu +> ["2025-03-09 01:00:00", "2025-03-09 02:00:00", "2025-03-09 03:00:00", "2025-03-09 04:00:00"] + | polars into-df + | polars as-datetime "%Y-%m-%d %H:%M:%S" --naive + | polars select (polars col datetime | polars replace-time-zone "America/New_York" --nonexistent null) +╭───┬──────────────╮ +│ # │ datetime │ +├───┼──────────────┤ +│ 0 │ 2 months ago │ +│ 1 │ │ +│ 2 │ 2 months ago │ +│ 3 │ 2 months ago │ +╰───┴──────────────╯ + +``` diff --git a/commands/docs/polars_replace.md b/commands/docs/polars_replace.md index 51032c3f269..0b115ac3e7c 100644 --- a/commands/docs/polars_replace.md +++ b/commands/docs/polars_replace.md @@ -2,7 +2,7 @@ title: polars replace categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Replace the leftmost (sub)string by a regex pattern. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Replaces string in column diff --git a/commands/docs/polars_reverse.md b/commands/docs/polars_reverse.md index ced94e15b03..b1cf0484dce 100644 --- a/commands/docs/polars_reverse.md +++ b/commands/docs/polars_reverse.md @@ -2,7 +2,7 @@ title: polars reverse categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Reverses the LazyFrame usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Reverses the dataframe. diff --git a/commands/docs/polars_rolling.md b/commands/docs/polars_rolling.md index 74275af3af2..596f529bca4 100644 --- a/commands/docs/polars_rolling.md +++ b/commands/docs/polars_rolling.md @@ -2,7 +2,7 @@ title: polars rolling categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Rolling calculation for a series. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Rolling sum for a series diff --git a/commands/docs/polars_sample.md b/commands/docs/polars_sample.md index 8937deb12b6..6108a48e644 100644 --- a/commands/docs/polars_sample.md +++ b/commands/docs/polars_sample.md @@ -2,7 +2,7 @@ title: polars sample categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Create sample dataframe. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Sample rows from dataframe diff --git a/commands/docs/polars_save.md b/commands/docs/polars_save.md index 31921504655..038959151bf 100644 --- a/commands/docs/polars_save.md +++ b/commands/docs/polars_save.md @@ -2,7 +2,7 @@ title: polars save categories: | lazyframe -version: 0.103.0 +version: 0.104.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: | @@ -44,7 +44,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | string | - ## Examples Performs a streaming collect and save the output to the specified file diff --git a/commands/docs/polars_schema.md b/commands/docs/polars_schema.md index 150ebd8c343..10b57bf93cb 100644 --- a/commands/docs/polars_schema.md +++ b/commands/docs/polars_schema.md @@ -2,7 +2,7 @@ title: polars schema categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Show schema for a dataframe. usage: | @@ -36,8 +36,7 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | -| any | any | - +| any | record | ## Examples Dataframe schema diff --git a/commands/docs/polars_select.md b/commands/docs/polars_select.md index 049c46fef52..7300ad90d02 100644 --- a/commands/docs/polars_select.md +++ b/commands/docs/polars_select.md @@ -2,7 +2,7 @@ title: polars select categories: | lazyframe -version: 0.103.0 +version: 0.104.0 lazyframe: | Selects columns from lazyframe. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Select a column from the dataframe @@ -52,3 +51,29 @@ Select a column from the dataframe ╰───┴───╯ ``` + +Select a column from a dataframe using a record +```nu +> [[a b]; [6 2] [4 2] [2 2]] | polars into-df | polars select {c: ((polars col a) * 2)} +╭───┬────╮ +│ # │ c │ +├───┼────┤ +│ 0 │ 12 │ +│ 1 │ 8 │ +│ 2 │ 4 │ +╰───┴────╯ + +``` + +Select a column from a dataframe using a mix of expressions and record of expressions +```nu +> [[a b]; [6 2] [4 2] [2 2]] | polars into-df | polars select a b {c: ((polars col a) ** 2)} +╭───┬───┬───┬────╮ +│ # │ a │ b │ c │ +├───┼───┼───┼────┤ +│ 0 │ 6 │ 2 │ 36 │ +│ 1 │ 4 │ 2 │ 16 │ +│ 2 │ 2 │ 2 │ 4 │ +╰───┴───┴───┴────╯ + +``` diff --git a/commands/docs/polars_set-with-idx.md b/commands/docs/polars_set-with-idx.md index 3d5645cfe63..2cd58cab216 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.103.0 +version: 0.104.0 dataframe: | Sets value in the given index. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Set value in selected rows from series diff --git a/commands/docs/polars_set.md b/commands/docs/polars_set.md index f7442b3d1db..3873095e118 100644 --- a/commands/docs/polars_set.md +++ b/commands/docs/polars_set.md @@ -2,7 +2,7 @@ title: polars set categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Sets value where given mask is true. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Shifts the values by a given period diff --git a/commands/docs/polars_shape.md b/commands/docs/polars_shape.md index 647e836c680..7cf68afef8d 100644 --- a/commands/docs/polars_shape.md +++ b/commands/docs/polars_shape.md @@ -2,7 +2,7 @@ title: polars shape categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Shows column and row size for a dataframe. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Shows row and column shape diff --git a/commands/docs/polars_shift.md b/commands/docs/polars_shift.md index 9bbd6c465e6..2f6e384a91e 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.103.0 +version: 0.104.0 dataframe_or_lazyframe: | Shifts the values by a given period. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Shifts the values by a given period diff --git a/commands/docs/polars_slice.md b/commands/docs/polars_slice.md index 8d94f8695ef..6d8354a85fc 100644 --- a/commands/docs/polars_slice.md +++ b/commands/docs/polars_slice.md @@ -2,7 +2,7 @@ title: polars slice categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates new dataframe from a slice of rows. usage: | @@ -38,7 +38,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Create new dataframe from a slice of the rows diff --git a/commands/docs/polars_sort-by.md b/commands/docs/polars_sort-by.md index d9a52301a07..b3021a0db76 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.103.0 +version: 0.104.0 lazyframe: | Sorts a lazy dataframe based on expression(s). usage: | @@ -43,7 +43,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Sort dataframe by one column diff --git a/commands/docs/polars_std.md b/commands/docs/polars_std.md index 6b44924afde..eb43951368b 100644 --- a/commands/docs/polars_std.md +++ b/commands/docs/polars_std.md @@ -2,7 +2,7 @@ title: polars std categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a std expression for an aggregation of std value from columns in a dataframe. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Std value from columns in a dataframe diff --git a/commands/docs/polars_store-get.md b/commands/docs/polars_store-get.md index 268a22dac36..2b4ea4ca741 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.103.0 +version: 0.104.0 dataframe: | Gets a Dataframe or other object from the plugin cache. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Get a stored object diff --git a/commands/docs/polars_store-ls.md b/commands/docs/polars_store-ls.md index bffb24d2928..380d0ee4a56 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.103.0 +version: 0.104.0 dataframe: | Lists stored polars objects. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates a new dataframe and shows it in the dataframe list diff --git a/commands/docs/polars_store-rm.md b/commands/docs/polars_store-rm.md index 98e8367b453..3646eab6a95 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.103.0 +version: 0.104.0 dataframe: | Removes a stored Dataframe or other object from the plugin cache. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------------ | | any | list\ | - ## Examples Removes a stored diff --git a/commands/docs/polars_str-join.md b/commands/docs/polars_str-join.md index 964651089db..5182d028377 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.103.0 +version: 0.104.0 dataframe: | Concatenates strings within a column or dataframes usage: | @@ -42,7 +42,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Join strings in a column diff --git a/commands/docs/polars_str-lengths.md b/commands/docs/polars_str-lengths.md index bc04889f2b1..1688c9a3101 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.103.0 +version: 0.104.0 dataframe: | Get lengths of all strings. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns string lengths for a column diff --git a/commands/docs/polars_str-slice.md b/commands/docs/polars_str-slice.md index 3e6f31c05f0..6b4ef372a33 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.103.0 +version: 0.104.0 dataframe: | Slices the string from the start position until the selected length. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Creates slices from the strings in a specified column diff --git a/commands/docs/polars_str-split.md b/commands/docs/polars_str-split.md index 5ae5f01e0fc..583019bc479 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.103.0 +version: 0.104.0 dataframe: | Split the string by a substring. The resulting dtype is list. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Split the string by comma, then create a new row for each string diff --git a/commands/docs/polars_str-strip-chars.md b/commands/docs/polars_str-strip-chars.md index 1072bb6bfa4..b026d5885d9 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.103.0 +version: 0.104.0 dataframe: | Strips specified characters from strings in a column usage: | @@ -42,7 +42,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Strip characters from both ends of strings in a column diff --git a/commands/docs/polars_strftime.md b/commands/docs/polars_strftime.md index a71b59d04bd..27afc42dc37 100644 --- a/commands/docs/polars_strftime.md +++ b/commands/docs/polars_strftime.md @@ -2,7 +2,7 @@ title: polars strftime categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Formats date based on string rule. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Formats date column as a string diff --git a/commands/docs/polars_sum.md b/commands/docs/polars_sum.md index 699307c3e1e..090618c4b55 100644 --- a/commands/docs/polars_sum.md +++ b/commands/docs/polars_sum.md @@ -2,7 +2,7 @@ title: polars sum categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates a sum expression for an aggregation or aggregates columns to their sum value. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Sums all columns in a dataframe diff --git a/commands/docs/polars_summary.md b/commands/docs/polars_summary.md index 4c7beb58209..f67329f8550 100644 --- a/commands/docs/polars_summary.md +++ b/commands/docs/polars_summary.md @@ -2,7 +2,7 @@ title: polars summary categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples list dataframe descriptives diff --git a/commands/docs/polars_take.md b/commands/docs/polars_take.md index 058c7e172aa..2b3d74ea766 100644 --- a/commands/docs/polars_take.md +++ b/commands/docs/polars_take.md @@ -2,7 +2,7 @@ title: polars take categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Creates new dataframe using the given indices. usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Takes selected rows from dataframe diff --git a/commands/docs/polars_truncate.md b/commands/docs/polars_truncate.md new file mode 100644 index 00000000000..3624776dd63 --- /dev/null +++ b/commands/docs/polars_truncate.md @@ -0,0 +1,59 @@ +--- +title: polars truncate +categories: | + expression +version: 0.104.0 +expression: | + Divide the date/datetime range into buckets. +usage: | + Divide the date/datetime range into buckets. +editLink: false +contributors: false +--- + + +# `polars truncate` for [expression](/commands/categories/expression.md) + +
Divide the date/datetime range into buckets.
+ +::: warning This command requires a plugin +The `polars truncate` command resides in the `polars` plugin. +To use this command, you must install and register `nu_plugin_polars`. +See the [Plugins](/book/plugins.html) chapter in the book for more information. +::: + + +## Signature + +```> polars truncate {flags} (every)``` + +## Parameters + + - `every`: Period length for every interval (can be duration or str) + + +## Input/output types: + +| input | output | +| ----- | ------ | +| any | any | +## Examples + +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 │ 3 months ago │ 3 months ago │ +│ 1 │ 2 months ago │ 2 months ago │ +│ 2 │ a month ago │ a month ago │ +│ 3 │ in a week │ in 5 days │ +╰───┴──────────────┴──────────────╯ + +``` + +## Notes +Each date/datetime is mapped to the start of its bucket using the corresponding local datetime. Note that weekly buckets start on Monday. Ambiguous results are localised using the DST offset of the original timestamp - for example, truncating '2022-11-06 01:30:00 CST' by '1h' results in '2022-11-06 01:00:00 CST', whereas truncating '2022-11-06 01:30:00 CDT' by '1h' results in '2022-11-06 01:00:00 CDT'. + + See Notes in documentation for full list of compatible string values for `every`: https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.dt.truncate.html \ No newline at end of file diff --git a/commands/docs/polars_unique.md b/commands/docs/polars_unique.md index a9bcfee0142..c37c05ee606 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.103.0 +version: 0.104.0 dataframe_or_lazyframe: | Returns unique values from a dataframe. usage: | @@ -39,7 +39,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Returns unique values from a series diff --git a/commands/docs/polars_unnest.md b/commands/docs/polars_unnest.md index d812fdbd412..671db453331 100644 --- a/commands/docs/polars_unnest.md +++ b/commands/docs/polars_unnest.md @@ -2,7 +2,7 @@ title: polars unnest categories: | dataframe -version: 0.103.0 +version: 0.104.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: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Unnest a dataframe diff --git a/commands/docs/polars_unpivot.md b/commands/docs/polars_unpivot.md index 4e7009991b7..c481b2099a7 100644 --- a/commands/docs/polars_unpivot.md +++ b/commands/docs/polars_unpivot.md @@ -2,7 +2,7 @@ title: polars unpivot categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Unpivot a DataFrame from wide to long format. usage: | @@ -40,7 +40,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples unpivot on an eager dataframe diff --git a/commands/docs/polars_uppercase.md b/commands/docs/polars_uppercase.md index ffbf855c503..4524c428937 100644 --- a/commands/docs/polars_uppercase.md +++ b/commands/docs/polars_uppercase.md @@ -2,7 +2,7 @@ title: polars uppercase categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Uppercase the strings in the column. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## 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 d0c08404962..a0e7c775ea1 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.103.0 +version: 0.104.0 dataframe: | Returns a dataframe with the counts for unique values in series. usage: | @@ -40,7 +40,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Calculates value counts diff --git a/commands/docs/polars_var.md b/commands/docs/polars_var.md index 43ac106199e..7c6fe6c91ad 100644 --- a/commands/docs/polars_var.md +++ b/commands/docs/polars_var.md @@ -2,7 +2,7 @@ title: polars var categories: | dataframe -version: 0.103.0 +version: 0.104.0 dataframe: | Create a var expression for an aggregation. usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Var value from columns in a dataframe or aggregates columns to their var value diff --git a/commands/docs/polars_when.md b/commands/docs/polars_when.md index ca4c6a23dd6..46e295744c7 100644 --- a/commands/docs/polars_when.md +++ b/commands/docs/polars_when.md @@ -2,7 +2,7 @@ title: polars when categories: | expression -version: 0.103.0 +version: 0.104.0 expression: | Creates and modifies a when expression. usage: | diff --git a/commands/docs/polars_with-column.md b/commands/docs/polars_with-column.md index 1836d0f0273..5f4043c7ee6 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.103.0 +version: 0.104.0 dataframe_or_lazyframe: | Adds a series to the dataframe. usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Adds a series to the dataframe @@ -75,3 +74,21 @@ Adds a series to the dataframe ╰───┴───┴───┴───┴───╯ ``` + +Add series to the dataframe using a record +```nu +> [[a b]; [1 2] [3 4]] + | polars into-lazy + | polars with-column { + c: ((polars col a) * 2) + d: ((polars col a) * 3) + } + | polars collect +╭───┬───┬───┬───┬───╮ +│ # │ a │ b │ c │ d │ +├───┼───┼───┼───┼───┤ +│ 0 │ 1 │ 2 │ 2 │ 3 │ +│ 1 │ 3 │ 4 │ 6 │ 9 │ +╰───┴───┴───┴───┴───╯ + +``` diff --git a/commands/docs/port.md b/commands/docs/port.md index fa8260f8861..f78509713b6 100644 --- a/commands/docs/port.md +++ b/commands/docs/port.md @@ -2,7 +2,7 @@ title: port categories: | network -version: 0.103.0 +version: 0.104.0 network: | Get a free port from system. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | int | - ## Examples get a free port between 3121 and 4000 diff --git a/commands/docs/prepend.md b/commands/docs/prepend.md index 29eb06d9e89..9266447ad53 100644 --- a/commands/docs/prepend.md +++ b/commands/docs/prepend.md @@ -2,7 +2,7 @@ title: prepend categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Prepend any number of rows to a table. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | --------- | | any | list\ | - ## Examples prepend a list to an item diff --git a/commands/docs/print.md b/commands/docs/print.md index 3afbd1b3303..b0ac32fb92d 100644 --- a/commands/docs/print.md +++ b/commands/docs/print.md @@ -2,7 +2,7 @@ title: print categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Print the given values to stdout. usage: | diff --git a/commands/docs/ps.md b/commands/docs/ps.md index 44475902e3b..7f1173ecc44 100644 --- a/commands/docs/ps.md +++ b/commands/docs/ps.md @@ -2,7 +2,7 @@ title: ps categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about system processes. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples List the system processes diff --git a/commands/docs/pwd.md b/commands/docs/pwd.md index 97c73e9ab1e..60632c5687a 100644 --- a/commands/docs/pwd.md +++ b/commands/docs/pwd.md @@ -2,7 +2,7 @@ title: pwd categories: | default -version: 0.103.0 +version: 0.104.0 default: | Return the current working directory usage: | @@ -29,4 +29,4 @@ contributors: false | input | output | | ----- | ------ | -| any | any | +| any | any | \ No newline at end of file diff --git a/commands/docs/query.md b/commands/docs/query.md index 364f94b3bf4..04c90a44866 100644 --- a/commands/docs/query.md +++ b/commands/docs/query.md @@ -2,7 +2,7 @@ title: query categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Show all the query commands usage: | @@ -34,7 +34,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | ----- | ------ | | any | any | - ## Subcommands: | name | description | type | diff --git a/commands/docs/query_db.md b/commands/docs/query_db.md index 0964c6018ae..c8f600d2ad5 100644 --- a/commands/docs/query_db.md +++ b/commands/docs/query_db.md @@ -2,7 +2,7 @@ title: query db categories: | database -version: 0.103.0 +version: 0.104.0 database: | Query a database using SQL. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Execute SQL against a SQLite database diff --git a/commands/docs/query_json.md b/commands/docs/query_json.md index 72a86cc4587..9ad365434af 100644 --- a/commands/docs/query_json.md +++ b/commands/docs/query_json.md @@ -2,7 +2,7 @@ title: query json categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | execute json query on json file (open --raw | query json 'query string') usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Get a list of children from a json object diff --git a/commands/docs/query_web.md b/commands/docs/query_web.md index 496b2e63f1b..64883be44b4 100644 --- a/commands/docs/query_web.md +++ b/commands/docs/query_web.md @@ -2,7 +2,7 @@ title: query web categories: | network -version: 0.103.0 +version: 0.104.0 network: | execute selector query on html/web usage: | @@ -41,7 +41,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Retrieve all `
` elements from phoronix.com website diff --git a/commands/docs/query_webpage-info.md b/commands/docs/query_webpage-info.md index 3f1495d0061..399301a0d72 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.103.0 +version: 0.104.0 network: | uses the webpage crate to extract info from html: title, description, language, links, RSS feeds, Opengraph, Schema.org, and more usage: | @@ -33,7 +33,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ------ | ------ | | string | record | - ## Examples extract detailed info from phoronix.com website diff --git a/commands/docs/query_xml.md b/commands/docs/query_xml.md index 320dec06d2f..a9301572c00 100644 --- a/commands/docs/query_xml.md +++ b/commands/docs/query_xml.md @@ -2,7 +2,7 @@ title: query xml categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | execute xpath query on xml usage: | @@ -36,4 +36,4 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | -| any | any | +| any | any | \ No newline at end of file diff --git a/commands/docs/random.md b/commands/docs/random.md index 693c26cff71..408cb153912 100644 --- a/commands/docs/random.md +++ b/commands/docs/random.md @@ -2,7 +2,7 @@ title: random categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random value. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/random_binary.md b/commands/docs/random_binary.md index 79924b38d66..e70c47d02b5 100644 --- a/commands/docs/random_binary.md +++ b/commands/docs/random_binary.md @@ -2,7 +2,7 @@ title: random binary categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate random bytes. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | binary | - ## Examples Generate 16 random bytes diff --git a/commands/docs/random_bool.md b/commands/docs/random_bool.md index 99e26a1648c..3037a31e8e1 100644 --- a/commands/docs/random_bool.md +++ b/commands/docs/random_bool.md @@ -2,7 +2,7 @@ title: random bool categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random boolean value. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | bool | - ## Examples Generate a random boolean value diff --git a/commands/docs/random_chars.md b/commands/docs/random_chars.md index e3363d36233..2d9d53c890a 100644 --- a/commands/docs/random_chars.md +++ b/commands/docs/random_chars.md @@ -2,7 +2,7 @@ title: random chars categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate random chars uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Generate a string with 25 random chars diff --git a/commands/docs/random_dice.md b/commands/docs/random_dice.md index 9165cfd103e..eed05e7c4ea 100644 --- a/commands/docs/random_dice.md +++ b/commands/docs/random_dice.md @@ -2,7 +2,7 @@ title: random dice categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random dice roll. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | --------- | | nothing | list\ | - ## Examples Roll 1 dice with 6 sides each diff --git a/commands/docs/random_float.md b/commands/docs/random_float.md index 98f25b24208..65b6e44ff8d 100644 --- a/commands/docs/random_float.md +++ b/commands/docs/random_float.md @@ -2,7 +2,7 @@ title: random float categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random float within a range [min..max]. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | float | - ## Examples Generate a default float value between 0 and 1 diff --git a/commands/docs/random_int.md b/commands/docs/random_int.md index b45553b489b..4d3e288c4d7 100644 --- a/commands/docs/random_int.md +++ b/commands/docs/random_int.md @@ -2,7 +2,7 @@ title: random int categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random integer [min..max]. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | int | - ## Examples Generate a non-negative random integer diff --git a/commands/docs/random_uuid.md b/commands/docs/random_uuid.md index da800ed58db..fbddaaae916 100644 --- a/commands/docs/random_uuid.md +++ b/commands/docs/random_uuid.md @@ -2,7 +2,7 @@ title: random uuid categories: | random -version: 0.103.0 +version: 0.104.0 random: | Generate a random uuid string of the specified version. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Generate a random uuid v4 string (default) diff --git a/commands/docs/reduce.md b/commands/docs/reduce.md index 0d8ff63d4f8..5ed52d9891a 100644 --- a/commands/docs/reduce.md +++ b/commands/docs/reduce.md @@ -2,7 +2,7 @@ title: reduce categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Aggregate a list (starting from the left) to a single value using an accumulator closure. usage: | diff --git a/commands/docs/registry_query.md b/commands/docs/registry_query.md index 33431378c04..f1d8155c352 100644 --- a/commands/docs/registry_query.md +++ b/commands/docs/registry_query.md @@ -2,7 +2,7 @@ title: registry query categories: | system -version: 0.103.0 +version: 0.104.0 system: | Query the Windows registry. usage: | diff --git a/commands/docs/reject.md b/commands/docs/reject.md index 0b998c8162a..39c8e42c294 100644 --- a/commands/docs/reject.md +++ b/commands/docs/reject.md @@ -2,7 +2,7 @@ title: reject categories: | filters -version: 0.103.0 +version: 0.104.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 fe7fb848d2a..2fe2be18873 100644 --- a/commands/docs/rename.md +++ b/commands/docs/rename.md @@ -2,7 +2,7 @@ title: rename categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Creates a new table with columns renamed. usage: | diff --git a/commands/docs/return.md b/commands/docs/return.md index c604e705f2a..053f8465bf2 100644 --- a/commands/docs/return.md +++ b/commands/docs/return.md @@ -2,7 +2,7 @@ title: return categories: | core -version: 0.103.0 +version: 0.104.0 core: | Return early from a custom command. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Return early diff --git a/commands/docs/reverse.md b/commands/docs/reverse.md index f7921a6737e..729231a4508 100644 --- a/commands/docs/reverse.md +++ b/commands/docs/reverse.md @@ -2,7 +2,7 @@ title: reverse categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Reverses the input list or table. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Reverse a list diff --git a/commands/docs/rm.md b/commands/docs/rm.md index efd4ae38288..cb2ea88427c 100644 --- a/commands/docs/rm.md +++ b/commands/docs/rm.md @@ -2,7 +2,7 @@ title: rm categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Remove files and directories. usage: | @@ -40,7 +40,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Delete, or move a file to the trash (based on the 'always_trash' config option) diff --git a/commands/docs/roll.md b/commands/docs/roll.md index 0a5ed44f4e5..eeffa39a01b 100644 --- a/commands/docs/roll.md +++ b/commands/docs/roll.md @@ -2,7 +2,7 @@ title: roll categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Rolling commands for tables. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/roll_down.md b/commands/docs/roll_down.md index 9ec116b0b61..105a783dd07 100644 --- a/commands/docs/roll_down.md +++ b/commands/docs/roll_down.md @@ -2,7 +2,7 @@ title: roll down categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Roll table rows down. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Rolls rows down of a table diff --git a/commands/docs/roll_left.md b/commands/docs/roll_left.md index f8f6969c3dc..d8f82023c49 100644 --- a/commands/docs/roll_left.md +++ b/commands/docs/roll_left.md @@ -2,7 +2,7 @@ title: roll left categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Roll record or table columns left. usage: | diff --git a/commands/docs/roll_right.md b/commands/docs/roll_right.md index b8a7ae6b502..4786fb33168 100644 --- a/commands/docs/roll_right.md +++ b/commands/docs/roll_right.md @@ -2,7 +2,7 @@ title: roll right categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Roll table columns right. usage: | diff --git a/commands/docs/roll_up.md b/commands/docs/roll_up.md index 910f0840821..c24958bd12c 100644 --- a/commands/docs/roll_up.md +++ b/commands/docs/roll_up.md @@ -2,7 +2,7 @@ title: roll up categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Roll table rows up. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Rolls rows up diff --git a/commands/docs/rotate.md b/commands/docs/rotate.md index 3d87ea88570..661cfc00018 100644 --- a/commands/docs/rotate.md +++ b/commands/docs/rotate.md @@ -2,7 +2,7 @@ title: rotate categories: | filters -version: 0.103.0 +version: 0.104.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 eff0d64fa71..93c7e7307d1 100644 --- a/commands/docs/run-external.md +++ b/commands/docs/run-external.md @@ -2,7 +2,7 @@ title: run-external categories: | system -version: 0.103.0 +version: 0.104.0 system: | Runs external command. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Run an external command diff --git a/commands/docs/save.md b/commands/docs/save.md index e6b6e203c90..3d85c448130 100644 --- a/commands/docs/save.md +++ b/commands/docs/save.md @@ -2,7 +2,7 @@ title: save categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Save a file. usage: | @@ -38,7 +38,6 @@ contributors: false | input | output | | ----- | ------- | | any | nothing | - ## Examples Save a string to foo.txt in the current directory diff --git a/commands/docs/schema.md b/commands/docs/schema.md index c494608851b..764fdb55bd9 100644 --- a/commands/docs/schema.md +++ b/commands/docs/schema.md @@ -2,7 +2,7 @@ title: schema categories: | database -version: 0.103.0 +version: 0.104.0 database: | Show the schema of a SQLite database. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Show the schema of a SQLite database diff --git a/commands/docs/scope.md b/commands/docs/scope.md index 564d5478147..ca032b005c0 100644 --- a/commands/docs/scope.md +++ b/commands/docs/scope.md @@ -2,7 +2,7 @@ title: scope categories: | core -version: 0.103.0 +version: 0.104.0 core: | Commands for getting info about what is in scope. usage: | @@ -27,7 +27,6 @@ contributors: false | ------- | ------ | | nothing | string | - ## Subcommands: | name | description | type | diff --git a/commands/docs/scope_aliases.md b/commands/docs/scope_aliases.md index 3549f0f151a..8480d7fc687 100644 --- a/commands/docs/scope_aliases.md +++ b/commands/docs/scope_aliases.md @@ -2,7 +2,7 @@ title: scope aliases categories: | core -version: 0.103.0 +version: 0.104.0 core: | Output info on the aliases in the current scope. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Show the aliases in the current scope diff --git a/commands/docs/scope_commands.md b/commands/docs/scope_commands.md index 22faf1d70bf..40243027a91 100644 --- a/commands/docs/scope_commands.md +++ b/commands/docs/scope_commands.md @@ -2,7 +2,7 @@ title: scope commands categories: | core -version: 0.103.0 +version: 0.104.0 core: | Output info on the commands in the current scope. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | --------- | | nothing | list\ | - ## Examples Show the commands in the current scope diff --git a/commands/docs/scope_engine-stats.md b/commands/docs/scope_engine-stats.md index 4069e6881db..5e065eb21f8 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.103.0 +version: 0.104.0 core: | Output stats on the engine in the current state. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Show the stats on the current engine state diff --git a/commands/docs/scope_externs.md b/commands/docs/scope_externs.md index db1525e3747..ea7d290dece 100644 --- a/commands/docs/scope_externs.md +++ b/commands/docs/scope_externs.md @@ -2,7 +2,7 @@ title: scope externs categories: | core -version: 0.103.0 +version: 0.104.0 core: | Output info on the known externals in the current scope. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Show the known externals in the current scope diff --git a/commands/docs/scope_modules.md b/commands/docs/scope_modules.md index 328113f022f..5c6a5ba60da 100644 --- a/commands/docs/scope_modules.md +++ b/commands/docs/scope_modules.md @@ -2,7 +2,7 @@ title: scope modules categories: | core -version: 0.103.0 +version: 0.104.0 core: | Output info on the modules in the current scope. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Show the modules in the current scope diff --git a/commands/docs/scope_variables.md b/commands/docs/scope_variables.md index d772bf9472f..fc28cd06c6d 100644 --- a/commands/docs/scope_variables.md +++ b/commands/docs/scope_variables.md @@ -2,7 +2,7 @@ title: scope variables categories: | core -version: 0.103.0 +version: 0.104.0 core: | Output info on the variables in the current scope. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Show the variables in the current scope diff --git a/commands/docs/select.md b/commands/docs/select.md index 231ba77a6ef..edc3f8599cb 100644 --- a/commands/docs/select.md +++ b/commands/docs/select.md @@ -2,7 +2,7 @@ title: select categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Select only these columns or rows from the input. Opposite of `reject`. usage: | diff --git a/commands/docs/seq.md b/commands/docs/seq.md index c492e8a3546..f022aef6cc3 100644 --- a/commands/docs/seq.md +++ b/commands/docs/seq.md @@ -2,7 +2,7 @@ title: seq categories: | generators -version: 0.103.0 +version: 0.104.0 generators: | Output sequences of numbers. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples sequence 1 to 10 diff --git a/commands/docs/seq_char.md b/commands/docs/seq_char.md index c5830fc2790..78dab89f741 100644 --- a/commands/docs/seq_char.md +++ b/commands/docs/seq_char.md @@ -2,7 +2,7 @@ title: seq char categories: | generators -version: 0.103.0 +version: 0.104.0 generators: | Print a sequence of ASCII characters. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples sequence a to e diff --git a/commands/docs/seq_date.md b/commands/docs/seq_date.md index e0916e6ebd9..062c29dfd36 100644 --- a/commands/docs/seq_date.md +++ b/commands/docs/seq_date.md @@ -2,7 +2,7 @@ title: seq date categories: | generators -version: 0.103.0 +version: 0.104.0 generators: | Print sequences of dates. usage: | @@ -37,7 +37,6 @@ contributors: false | input | output | | ------- | ------------ | | nothing | list\ | - ## Examples Return a list of the next 10 days in the YYYY-MM-DD format diff --git a/commands/docs/shuffle.md b/commands/docs/shuffle.md index 429136ef665..f961d8048ca 100644 --- a/commands/docs/shuffle.md +++ b/commands/docs/shuffle.md @@ -2,7 +2,7 @@ title: shuffle categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Shuffle rows randomly. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Shuffle rows randomly (execute it several times and see the difference) diff --git a/commands/docs/skip.md b/commands/docs/skip.md index d3e4fa29e6b..988709e16c3 100644 --- a/commands/docs/skip.md +++ b/commands/docs/skip.md @@ -2,7 +2,7 @@ title: skip categories: | filters -version: 0.103.0 +version: 0.104.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 67a014dd122..ab9fd1fe17d 100644 --- a/commands/docs/skip_until.md +++ b/commands/docs/skip_until.md @@ -2,7 +2,7 @@ title: skip until categories: | filters -version: 0.103.0 +version: 0.104.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 56a51c9a239..6699b484972 100644 --- a/commands/docs/skip_while.md +++ b/commands/docs/skip_while.md @@ -2,7 +2,7 @@ title: skip while categories: | filters -version: 0.103.0 +version: 0.104.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 8cf9a9a24ef..e6e03a0b8e1 100644 --- a/commands/docs/sleep.md +++ b/commands/docs/sleep.md @@ -2,7 +2,7 @@ title: sleep categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Delay for a specified amount of time. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Sleep for 1sec diff --git a/commands/docs/slice.md b/commands/docs/slice.md index 4b9a9fe4015..8c4e9e1087b 100644 --- a/commands/docs/slice.md +++ b/commands/docs/slice.md @@ -2,7 +2,7 @@ title: slice categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Return only the selected rows. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Get the last 2 items diff --git a/commands/docs/sort-by.md b/commands/docs/sort-by.md index 730c69ce723..62c3cd7e332 100644 --- a/commands/docs/sort-by.md +++ b/commands/docs/sort-by.md @@ -2,7 +2,7 @@ title: sort-by categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Sort by the given cell path or closure. usage: | diff --git a/commands/docs/sort.md b/commands/docs/sort.md index 598a2535d0e..2860c966820 100644 --- a/commands/docs/sort.md +++ b/commands/docs/sort.md @@ -2,7 +2,7 @@ title: sort categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Sort in increasing order. usage: | diff --git a/commands/docs/source-env.md b/commands/docs/source-env.md index e538bb60207..ca642d5cbb8 100644 --- a/commands/docs/source-env.md +++ b/commands/docs/source-env.md @@ -2,7 +2,7 @@ title: source-env categories: | core -version: 0.103.0 +version: 0.104.0 core: | Source the environment from a source file into the current environment. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Sources the environment from foo.nu in the current context diff --git a/commands/docs/source.md b/commands/docs/source.md index 40d19380916..37ddd224b53 100644 --- a/commands/docs/source.md +++ b/commands/docs/source.md @@ -2,7 +2,7 @@ title: source categories: | core -version: 0.103.0 +version: 0.104.0 core: | Runs a script file in the current context. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Runs foo.nu in the current context diff --git a/commands/docs/split.md b/commands/docs/split.md index b898c8fcaef..322e1bd7def 100644 --- a/commands/docs/split.md +++ b/commands/docs/split.md @@ -2,7 +2,7 @@ title: split categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Split contents across desired subcommand (like row, column) via the separator. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/split_cell-path.md b/commands/docs/split_cell-path.md index 7978f47b76f..d2125aca87b 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.103.0 +version: 0.104.0 conversions: | Split a cell-path into its components. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | --------- | --------- | | cell-path | list\ | - ## Examples Split a cell-path into its components diff --git a/commands/docs/split_chars.md b/commands/docs/split_chars.md index c92f3bb5b74..8d1f23c4808 100644 --- a/commands/docs/split_chars.md +++ b/commands/docs/split_chars.md @@ -2,7 +2,7 @@ title: split chars categories: | strings -version: 0.103.0 +version: 0.104.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 fe4145acc0b..8444e850f80 100644 --- a/commands/docs/split_column.md +++ b/commands/docs/split_column.md @@ -2,7 +2,7 @@ title: split column categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Split a string into multiple columns using a separator. usage: | diff --git a/commands/docs/split_list.md b/commands/docs/split_list.md index 23448ac495f..400647ed7d0 100644 --- a/commands/docs/split_list.md +++ b/commands/docs/split_list.md @@ -2,7 +2,7 @@ title: split list categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Split a list into multiple lists using a separator. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | --------- | --------------- | | list\ | list\\> | - ## Examples Split a list of chars into two lists diff --git a/commands/docs/split_row.md b/commands/docs/split_row.md index b19544aae90..158cfed4f04 100644 --- a/commands/docs/split_row.md +++ b/commands/docs/split_row.md @@ -2,7 +2,7 @@ title: split row categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Split a string into multiple rows using a separator. usage: | diff --git a/commands/docs/split_words.md b/commands/docs/split_words.md index acd66b80729..6b31fa6caa9 100644 --- a/commands/docs/split_words.md +++ b/commands/docs/split_words.md @@ -2,7 +2,7 @@ title: split words categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Split a string's words into separate rows. usage: | diff --git a/commands/docs/start.md b/commands/docs/start.md index c4703451ee2..af59d7be3ca 100644 --- a/commands/docs/start.md +++ b/commands/docs/start.md @@ -2,7 +2,7 @@ title: start categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Open a folder, file, or website in the default application or viewer. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Open a text file with the default text editor diff --git a/commands/docs/stor.md b/commands/docs/stor.md index 1cc45325592..a311786b8f3 100644 --- a/commands/docs/stor.md +++ b/commands/docs/stor.md @@ -2,7 +2,7 @@ title: stor categories: | database -version: 0.103.0 +version: 0.104.0 database: | Various commands for working with the in-memory sqlite database. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/stor_create.md b/commands/docs/stor_create.md index d7e87bd25b0..3a01eba75b0 100644 --- a/commands/docs/stor_create.md +++ b/commands/docs/stor_create.md @@ -2,7 +2,7 @@ title: stor create categories: | database -version: 0.103.0 +version: 0.104.0 database: | Create a table in the in-memory sqlite database. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Create an in-memory sqlite database with specified table name, column names, and column data types diff --git a/commands/docs/stor_delete.md b/commands/docs/stor_delete.md index 15a7d5d461c..ff76a59f20c 100644 --- a/commands/docs/stor_delete.md +++ b/commands/docs/stor_delete.md @@ -2,7 +2,7 @@ title: stor delete categories: | database -version: 0.103.0 +version: 0.104.0 database: | Delete a table or specified rows in the in-memory sqlite database. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Delete a table from the in-memory sqlite database diff --git a/commands/docs/stor_export.md b/commands/docs/stor_export.md index 727a4392815..45061da0ac3 100644 --- a/commands/docs/stor_export.md +++ b/commands/docs/stor_export.md @@ -2,7 +2,7 @@ title: stor export categories: | database -version: 0.103.0 +version: 0.104.0 database: | Export the in-memory sqlite database to a sqlite database file. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Export the in-memory sqlite database diff --git a/commands/docs/stor_import.md b/commands/docs/stor_import.md index 9c2a47fcfdd..aab5f2f3baa 100644 --- a/commands/docs/stor_import.md +++ b/commands/docs/stor_import.md @@ -2,7 +2,7 @@ title: stor import categories: | database -version: 0.103.0 +version: 0.104.0 database: | Import a sqlite database file into the in-memory sqlite database. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Import a sqlite database file into the in-memory sqlite database diff --git a/commands/docs/stor_insert.md b/commands/docs/stor_insert.md index 561f256c183..6444e199046 100644 --- a/commands/docs/stor_insert.md +++ b/commands/docs/stor_insert.md @@ -2,7 +2,7 @@ title: stor insert categories: | database -version: 0.103.0 +version: 0.104.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 45ee2338edc..d5ac4cbed0f 100644 --- a/commands/docs/stor_open.md +++ b/commands/docs/stor_open.md @@ -2,7 +2,7 @@ title: stor open categories: | database -version: 0.103.0 +version: 0.104.0 database: | Opens the in-memory sqlite database. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Open the in-memory sqlite database diff --git a/commands/docs/stor_reset.md b/commands/docs/stor_reset.md index 21784ecb012..be741988c42 100644 --- a/commands/docs/stor_reset.md +++ b/commands/docs/stor_reset.md @@ -2,7 +2,7 @@ title: stor reset categories: | database -version: 0.103.0 +version: 0.104.0 database: | Reset the in-memory database by dropping all tables. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Reset the in-memory sqlite database diff --git a/commands/docs/stor_update.md b/commands/docs/stor_update.md index 907b6157aa7..5493f880c81 100644 --- a/commands/docs/stor_update.md +++ b/commands/docs/stor_update.md @@ -2,7 +2,7 @@ title: stor update categories: | database -version: 0.103.0 +version: 0.104.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 20586516351..515bcd10cdb 100644 --- a/commands/docs/str.md +++ b/commands/docs/str.md @@ -2,7 +2,7 @@ title: str categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Various commands for working with string data. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/str_camel-case.md b/commands/docs/str_camel-case.md index 90dd1941125..73a73f07193 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.103.0 +version: 0.104.0 strings: | Convert a string to camelCase. usage: | diff --git a/commands/docs/str_capitalize.md b/commands/docs/str_capitalize.md index 0c045a43fff..293da29bad1 100644 --- a/commands/docs/str_capitalize.md +++ b/commands/docs/str_capitalize.md @@ -2,7 +2,7 @@ title: str capitalize categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Capitalize first letter of text. usage: | diff --git a/commands/docs/str_contains.md b/commands/docs/str_contains.md index 6da7cd8ba51..73c4bdf9763 100644 --- a/commands/docs/str_contains.md +++ b/commands/docs/str_contains.md @@ -2,7 +2,7 @@ title: str contains categories: | strings -version: 0.103.0 +version: 0.104.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 c3496f970d7..495f9c7e891 100644 --- a/commands/docs/str_distance.md +++ b/commands/docs/str_distance.md @@ -2,7 +2,7 @@ title: str distance categories: | strings -version: 0.103.0 +version: 0.104.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 fcab7af45ba..a427984fb56 100644 --- a/commands/docs/str_downcase.md +++ b/commands/docs/str_downcase.md @@ -2,7 +2,7 @@ title: str downcase categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Make text lowercase. usage: | diff --git a/commands/docs/str_ends-with.md b/commands/docs/str_ends-with.md index fab9f10b7c5..cd2a98a7b02 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.103.0 +version: 0.104.0 strings: | Check if an input ends with a string. usage: | diff --git a/commands/docs/str_expand.md b/commands/docs/str_expand.md index f6ec1a7a438..b6562329950 100644 --- a/commands/docs/str_expand.md +++ b/commands/docs/str_expand.md @@ -2,7 +2,7 @@ title: str expand categories: | strings -version: 0.103.0 +version: 0.104.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 dcc0a7756eb..abbe8881e9e 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.103.0 +version: 0.104.0 strings: | Returns start index of first occurrence of string in input, or -1 if no match. usage: | diff --git a/commands/docs/str_join.md b/commands/docs/str_join.md index 203fe2c1d4d..af1b77a7a9e 100644 --- a/commands/docs/str_join.md +++ b/commands/docs/str_join.md @@ -2,7 +2,7 @@ title: str join categories: | strings -version: 0.103.0 +version: 0.104.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 7b09995066e..3a8efed7a31 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.103.0 +version: 0.104.0 strings: | Convert a string to kebab-case. usage: | diff --git a/commands/docs/str_length.md b/commands/docs/str_length.md index c88b326dd0e..eadb1695b2d 100644 --- a/commands/docs/str_length.md +++ b/commands/docs/str_length.md @@ -2,7 +2,7 @@ title: str length categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Output the length of any strings in the pipeline. usage: | diff --git a/commands/docs/str_pascal-case.md b/commands/docs/str_pascal-case.md index afba6359d5d..c4b42870d3b 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.103.0 +version: 0.104.0 strings: | Convert a string to PascalCase. usage: | diff --git a/commands/docs/str_replace.md b/commands/docs/str_replace.md index f3338937a42..b0bac680716 100644 --- a/commands/docs/str_replace.md +++ b/commands/docs/str_replace.md @@ -2,7 +2,7 @@ title: str replace categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Find and replace text. usage: | diff --git a/commands/docs/str_reverse.md b/commands/docs/str_reverse.md index a4e36beee01..63f25342c19 100644 --- a/commands/docs/str_reverse.md +++ b/commands/docs/str_reverse.md @@ -2,7 +2,7 @@ title: str reverse categories: | strings -version: 0.103.0 +version: 0.104.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 ffae837d758..79b4ef4ccdc 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.103.0 +version: 0.104.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 d20c7b700a8..41ff9924cb0 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.103.0 +version: 0.104.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 da9fd241923..bcc9df97457 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.103.0 +version: 0.104.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 b6e182fa012..dedfb1c6a77 100644 --- a/commands/docs/str_stats.md +++ b/commands/docs/str_stats.md @@ -2,7 +2,7 @@ title: str stats categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Gather word count statistics on the text. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | string | record | - ## Examples Count the number of words in a string diff --git a/commands/docs/str_substring.md b/commands/docs/str_substring.md index db51a10527f..2f60b40ac8a 100644 --- a/commands/docs/str_substring.md +++ b/commands/docs/str_substring.md @@ -2,7 +2,7 @@ title: str substring categories: | strings -version: 0.103.0 +version: 0.104.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 b391afad991..45965a4e7a4 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.103.0 +version: 0.104.0 strings: | Convert a string to Title Case. usage: | diff --git a/commands/docs/str_trim.md b/commands/docs/str_trim.md index d3cd69ce6eb..00b38219945 100644 --- a/commands/docs/str_trim.md +++ b/commands/docs/str_trim.md @@ -2,7 +2,7 @@ title: str trim categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Trim whitespace or specific character. usage: | diff --git a/commands/docs/str_upcase.md b/commands/docs/str_upcase.md index faa8e8e1a60..c356b369e2c 100644 --- a/commands/docs/str_upcase.md +++ b/commands/docs/str_upcase.md @@ -2,7 +2,7 @@ title: str upcase categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Make text uppercase. usage: | diff --git a/commands/docs/sys.md b/commands/docs/sys.md index 5c2cb90c3ad..5481a47a889 100644 --- a/commands/docs/sys.md +++ b/commands/docs/sys.md @@ -2,7 +2,7 @@ title: sys categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples Show info about the system diff --git a/commands/docs/sys_cpu.md b/commands/docs/sys_cpu.md index 23743c32c2f..5bacae27fbf 100644 --- a/commands/docs/sys_cpu.md +++ b/commands/docs/sys_cpu.md @@ -2,7 +2,7 @@ title: sys cpu categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system CPUs. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show info about the system CPUs diff --git a/commands/docs/sys_disks.md b/commands/docs/sys_disks.md index 46060ada981..f0f0988a0f7 100644 --- a/commands/docs/sys_disks.md +++ b/commands/docs/sys_disks.md @@ -2,7 +2,7 @@ title: sys disks categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system disks. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show info about the system disks diff --git a/commands/docs/sys_host.md b/commands/docs/sys_host.md index a3fee2271b9..447a8fa7ab2 100644 --- a/commands/docs/sys_host.md +++ b/commands/docs/sys_host.md @@ -2,7 +2,7 @@ title: sys host categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system host. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples Show info about the system host diff --git a/commands/docs/sys_mem.md b/commands/docs/sys_mem.md index a3972f8e76f..d2525bd61d6 100644 --- a/commands/docs/sys_mem.md +++ b/commands/docs/sys_mem.md @@ -2,7 +2,7 @@ title: sys mem categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system memory. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples Show info about the system memory diff --git a/commands/docs/sys_net.md b/commands/docs/sys_net.md index a18c71aa28e..5274d6721ae 100644 --- a/commands/docs/sys_net.md +++ b/commands/docs/sys_net.md @@ -2,7 +2,7 @@ title: sys net categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the system network interfaces. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show info about the system network diff --git a/commands/docs/sys_temp.md b/commands/docs/sys_temp.md index 851a6080733..66454029cb5 100644 --- a/commands/docs/sys_temp.md +++ b/commands/docs/sys_temp.md @@ -2,7 +2,7 @@ title: sys temp categories: | system -version: 0.103.0 +version: 0.104.0 system: | View the temperatures of system components. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show the system temperatures diff --git a/commands/docs/sys_users.md b/commands/docs/sys_users.md index d6972fa9f8a..6b9c1909573 100644 --- a/commands/docs/sys_users.md +++ b/commands/docs/sys_users.md @@ -2,7 +2,7 @@ title: sys users categories: | system -version: 0.103.0 +version: 0.104.0 system: | View information about the users on the system. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Show info about the system users diff --git a/commands/docs/table.md b/commands/docs/table.md index 21a44bb3d6f..7e3f955b1b4 100644 --- a/commands/docs/table.md +++ b/commands/docs/table.md @@ -2,7 +2,7 @@ title: table categories: | viewers -version: 0.103.0 +version: 0.104.0 viewers: | Render the table. usage: | @@ -40,7 +40,6 @@ Be aware collapse mode currently doesn't support width control | input | output | | ----- | ------ | | any | any | - ## Examples List the files in current directory, with indexes starting from 1 diff --git a/commands/docs/take.md b/commands/docs/take.md index 96edf51180a..311984e217c 100644 --- a/commands/docs/take.md +++ b/commands/docs/take.md @@ -2,7 +2,7 @@ title: take categories: | filters -version: 0.103.0 +version: 0.104.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 050a367d0a7..b0342f65cf0 100644 --- a/commands/docs/take_until.md +++ b/commands/docs/take_until.md @@ -2,7 +2,7 @@ title: take until categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Take elements of the input until a predicate is true. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Take until the element is positive diff --git a/commands/docs/take_while.md b/commands/docs/take_while.md index b274c86eca6..ad32d9b1098 100644 --- a/commands/docs/take_while.md +++ b/commands/docs/take_while.md @@ -2,7 +2,7 @@ title: take while categories: | filters -version: 0.103.0 +version: 0.104.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 a31a4d44c69..ff1212582c2 100644 --- a/commands/docs/tee.md +++ b/commands/docs/tee.md @@ -2,7 +2,7 @@ title: tee categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Copy a stream to another command in parallel. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Save a webpage to a file while also printing it diff --git a/commands/docs/term.md b/commands/docs/term.md index c2078963b46..b814941e10d 100644 --- a/commands/docs/term.md +++ b/commands/docs/term.md @@ -2,7 +2,7 @@ title: term categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Commands for querying information about the terminal. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/term_query.md b/commands/docs/term_query.md index 1e42eb810c6..2cb4120bd86 100644 --- a/commands/docs/term_query.md +++ b/commands/docs/term_query.md @@ -2,7 +2,7 @@ title: term query categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Query the terminal for information. usage: | @@ -36,7 +36,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | binary | - ## Examples Get cursor position. diff --git a/commands/docs/term_size.md b/commands/docs/term_size.md index 7978befc401..f7c0e76bcee 100644 --- a/commands/docs/term_size.md +++ b/commands/docs/term_size.md @@ -2,7 +2,7 @@ title: term size categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Returns a record containing the number of columns (width) and rows (height) of the terminal. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------------------------------- | | nothing | record\ | - ## Examples Return the columns (width) and rows (height) of the terminal diff --git a/commands/docs/timeit.md b/commands/docs/timeit.md index 27b7da02fa2..cf668a5d726 100644 --- a/commands/docs/timeit.md +++ b/commands/docs/timeit.md @@ -2,7 +2,7 @@ title: timeit categories: | debug -version: 0.103.0 +version: 0.104.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 03dbfa749d4..d932363d8c1 100644 --- a/commands/docs/to.md +++ b/commands/docs/to.md @@ -2,7 +2,7 @@ title: to categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Translate structured data to a format. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/to_csv.md b/commands/docs/to_csv.md index 9c89166dfd5..f7e189f2549 100644 --- a/commands/docs/to_csv.md +++ b/commands/docs/to_csv.md @@ -2,7 +2,7 @@ title: to csv categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into .csv text . usage: | diff --git a/commands/docs/to_html.md b/commands/docs/to_html.md index b09f2de0dc0..c4b25b77917 100644 --- a/commands/docs/to_html.md +++ b/commands/docs/to_html.md @@ -2,7 +2,7 @@ title: to html categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into simple HTML. usage: | diff --git a/commands/docs/to_json.md b/commands/docs/to_json.md index 76d0323db31..268432e9aa6 100644 --- a/commands/docs/to_json.md +++ b/commands/docs/to_json.md @@ -2,7 +2,7 @@ title: to json categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Converts table data into JSON text. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs a JSON string, with default indentation, representing the contents of this table diff --git a/commands/docs/to_md.md b/commands/docs/to_md.md index 1f9883abf44..408b8fb0511 100644 --- a/commands/docs/to_md.md +++ b/commands/docs/to_md.md @@ -2,7 +2,7 @@ title: to md categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into simple Markdown. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs an MD string representing the contents of this table @@ -40,7 +39,6 @@ Outputs an MD string representing the contents of this table |foo|bar| |-|-| |1|2| - ``` Optionally, output a formatted markdown string @@ -49,7 +47,6 @@ Optionally, output a formatted markdown string | foo | bar | | --- | --- | | 1 | 2 | - ``` Treat each row as a markdown element @@ -68,3 +65,15 @@ Render a list 1 2 ``` + +Separate list into markdown tables +```nu +> [ {foo: 1, bar: 2} {foo: 3, bar: 4} {foo: 5}] | to md --per-element +|foo|bar| +|-|-| +|1|2| +|3|4| +|foo| +|-| +|5| +``` diff --git a/commands/docs/to_msgpack.md b/commands/docs/to_msgpack.md index e84a93c2ac7..e78eb00a5bd 100644 --- a/commands/docs/to_msgpack.md +++ b/commands/docs/to_msgpack.md @@ -2,7 +2,7 @@ title: to msgpack categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert Nu values into MessagePack. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | binary | - ## Examples Convert a list of values to MessagePack diff --git a/commands/docs/to_msgpackz.md b/commands/docs/to_msgpackz.md index cf051e72967..64763e861b4 100644 --- a/commands/docs/to_msgpackz.md +++ b/commands/docs/to_msgpackz.md @@ -2,7 +2,7 @@ title: to msgpackz categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert Nu values into brotli-compressed MessagePack. usage: | @@ -32,6 +32,5 @@ contributors: false | input | output | | ----- | ------ | | any | binary | - ## Notes This is the format used by the plugin registry file ($nu.plugin-path). \ No newline at end of file diff --git a/commands/docs/to_nuon.md b/commands/docs/to_nuon.md index 05e927ca200..ce725f2c9fa 100644 --- a/commands/docs/to_nuon.md +++ b/commands/docs/to_nuon.md @@ -2,7 +2,7 @@ title: to nuon categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Converts table data into Nuon (Nushell Object Notation) text. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs a NUON string representing the contents of this list, compact by default diff --git a/commands/docs/to_plist.md b/commands/docs/to_plist.md index 5fd594940a1..8d1b56cfa9c 100644 --- a/commands/docs/to_plist.md +++ b/commands/docs/to_plist.md @@ -2,7 +2,7 @@ title: to plist categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert Nu values into plist usage: | @@ -37,7 +37,6 @@ See the [Plugins](/book/plugins.html) chapter in the book for more information. | input | output | | ----- | ------ | | any | any | - ## Examples Convert a table into a plist file diff --git a/commands/docs/to_text.md b/commands/docs/to_text.md index 55a01c1a4ba..4b14912f478 100644 --- a/commands/docs/to_text.md +++ b/commands/docs/to_text.md @@ -2,7 +2,7 @@ title: to text categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Converts data into simple text. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs data as simple text with a trailing newline diff --git a/commands/docs/to_toml.md b/commands/docs/to_toml.md index 94c038c85ed..3b1bcf6fca3 100644 --- a/commands/docs/to_toml.md +++ b/commands/docs/to_toml.md @@ -2,7 +2,7 @@ title: to toml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert record into .toml text. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------ | ------ | | record | string | - ## Examples Outputs an TOML string representing the contents of this record diff --git a/commands/docs/to_tsv.md b/commands/docs/to_tsv.md index a16ddc488c6..f3db825a871 100644 --- a/commands/docs/to_tsv.md +++ b/commands/docs/to_tsv.md @@ -2,7 +2,7 @@ title: to tsv categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into .tsv text. usage: | diff --git a/commands/docs/to_xml.md b/commands/docs/to_xml.md index 112cca84bac..262bc7b982d 100644 --- a/commands/docs/to_xml.md +++ b/commands/docs/to_xml.md @@ -2,7 +2,7 @@ title: to xml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert special record structure into .xml text. usage: | @@ -32,7 +32,6 @@ contributors: false | input | output | | ------ | ------ | | record | string | - ## Examples Outputs an XML string representing the contents of this table diff --git a/commands/docs/to_yaml.md b/commands/docs/to_yaml.md index b2bb496506e..f69975d73c1 100644 --- a/commands/docs/to_yaml.md +++ b/commands/docs/to_yaml.md @@ -2,7 +2,7 @@ title: to yaml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into .yaml/.yml text. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs a YAML string representing the contents of this table diff --git a/commands/docs/to_yml.md b/commands/docs/to_yml.md index edbb281b4f0..1447b886c27 100644 --- a/commands/docs/to_yml.md +++ b/commands/docs/to_yml.md @@ -2,7 +2,7 @@ title: to yml categories: | formats -version: 0.103.0 +version: 0.104.0 formats: | Convert table into .yaml/.yml text. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ----- | ------ | | any | string | - ## Examples Outputs a YAML string representing the contents of this table diff --git a/commands/docs/touch.md b/commands/docs/touch.md index f72d46f38fa..2de1ffb5ffe 100644 --- a/commands/docs/touch.md +++ b/commands/docs/touch.md @@ -2,7 +2,7 @@ title: touch categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Creates one or more files. usage: | @@ -40,7 +40,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Creates "fixture.json" diff --git a/commands/docs/transpose.md b/commands/docs/transpose.md index 39f5ee35251..2afe4c664c7 100644 --- a/commands/docs/transpose.md +++ b/commands/docs/transpose.md @@ -2,7 +2,7 @@ title: transpose categories: | filters -version: 0.103.0 +version: 0.104.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 f7cf1aca948..fca9529fb6f 100644 --- a/commands/docs/try.md +++ b/commands/docs/try.md @@ -2,7 +2,7 @@ title: try categories: | core -version: 0.103.0 +version: 0.104.0 core: | Try to run a block, if it fails optionally run a catch closure. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Try to run a division by zero diff --git a/commands/docs/tutor.md b/commands/docs/tutor.md index 26a368e8acb..0b6f7628bc9 100644 --- a/commands/docs/tutor.md +++ b/commands/docs/tutor.md @@ -2,7 +2,7 @@ title: tutor categories: | misc -version: 0.103.0 +version: 0.104.0 misc: | Run the tutorial. To begin, run: tutor. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Begin the tutorial diff --git a/commands/docs/ulimit.md b/commands/docs/ulimit.md index 3eba1c11b51..b62525cbe4b 100644 --- a/commands/docs/ulimit.md +++ b/commands/docs/ulimit.md @@ -2,7 +2,7 @@ title: ulimit categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Set or get resource usage limits. usage: | @@ -43,7 +43,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | any | - ## Examples Print all current limits diff --git a/commands/docs/uname.md b/commands/docs/uname.md index e3ee79ce8c3..cb4940c750a 100644 --- a/commands/docs/uname.md +++ b/commands/docs/uname.md @@ -2,7 +2,7 @@ title: uname categories: | system -version: 0.103.0 +version: 0.104.0 system: | Print certain system information using uutils/coreutils uname. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Print all information diff --git a/commands/docs/uniq-by.md b/commands/docs/uniq-by.md index 067c8b7b6fd..d776c44eec6 100644 --- a/commands/docs/uniq-by.md +++ b/commands/docs/uniq-by.md @@ -2,7 +2,7 @@ title: uniq-by categories: | filters -version: 0.103.0 +version: 0.104.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 c3c8a50be33..2dcb6133f6e 100644 --- a/commands/docs/uniq.md +++ b/commands/docs/uniq.md @@ -2,7 +2,7 @@ title: uniq categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Return the distinct values in the input. usage: | @@ -33,7 +33,6 @@ contributors: false | input | output | | --------- | --------- | | list\ | list\ | - ## Examples Return the distinct values of a list/table (remove duplicates so that each value occurs once only) diff --git a/commands/docs/update.md b/commands/docs/update.md index b8025409708..ad4b0d30c9b 100644 --- a/commands/docs/update.md +++ b/commands/docs/update.md @@ -2,7 +2,7 @@ title: update categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Update an existing column to have a new value. usage: | @@ -97,4 +97,4 @@ When updating a specific index, the closure will instead be run once. The first | name | description | type | | ------------------------------------------------ | ----------------------- | -------- | -| [`update cells`](/commands/docs/update_cells.md) | Update the table cells. | built-in | +| [`update cells`](/commands/docs/update_cells.md) | Update the table cells. | built-in | \ No newline at end of file diff --git a/commands/docs/update_cells.md b/commands/docs/update_cells.md index e28d08c4d97..1b625a33160 100644 --- a/commands/docs/update_cells.md +++ b/commands/docs/update_cells.md @@ -2,7 +2,7 @@ title: update cells categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Update the table cells. usage: | @@ -34,7 +34,6 @@ contributors: false | input | output | | ----- | ------ | | table | table | - ## Examples Update the zero value cells to empty strings. @@ -49,11 +48,11 @@ Update the zero value cells to empty strings. $value } } -╭───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────╮ -│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ -├───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┤ -│ 0 │ 37 │ │ │ │ 37 │ │ │ -╰───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────╯ +╭──────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬──────────────╮ +│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ +├──────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼──────────────┤ +│ 0 │ 37 │ │ │ │ 37 │ │ │ +╰──────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴──────────────╯ ``` @@ -69,10 +68,10 @@ Update the zero value cells to empty strings in 2 last columns. $value } } -╭───┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────╮ -│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ -├───┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┤ -│ 0 │ 37 │ 0 │ 0 │ 0 │ 37 │ │ │ -╰───┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────╯ +╭──────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬──────────────╮ +│ # │ 2021-04-16 │ 2021-06-10 │ 2021-09-18 │ 2021-10-15 │ 2021-11-16 │ 2021-11-17 │ 2021-11-18 │ +├──────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┼──────────────┤ +│ 0 │ 37 │ 0 │ 0 │ 0 │ 37 │ │ │ +╰──────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┴──────────────╯ ``` diff --git a/commands/docs/upsert.md b/commands/docs/upsert.md index 4338a157f30..1b53c4f27c1 100644 --- a/commands/docs/upsert.md +++ b/commands/docs/upsert.md @@ -2,7 +2,7 @@ title: upsert categories: | filters -version: 0.103.0 +version: 0.104.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 83c6c447b81..dce2cc8a08b 100644 --- a/commands/docs/url.md +++ b/commands/docs/url.md @@ -2,7 +2,7 @@ title: url categories: | network -version: 0.103.0 +version: 0.104.0 network: | Various commands for working with URLs. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/url_build-query.md b/commands/docs/url_build-query.md index b3b441de6ce..d4d14b5eb4f 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.103.0 +version: 0.104.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 502c2eca90a..3275b39ff46 100644 --- a/commands/docs/url_decode.md +++ b/commands/docs/url_decode.md @@ -2,7 +2,7 @@ title: url decode categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Converts a percent-encoded web safe string to a string. usage: | diff --git a/commands/docs/url_encode.md b/commands/docs/url_encode.md index dae804e6302..56c0932ffae 100644 --- a/commands/docs/url_encode.md +++ b/commands/docs/url_encode.md @@ -2,7 +2,7 @@ title: url encode categories: | strings -version: 0.103.0 +version: 0.104.0 strings: | Converts a string to a percent encoded web safe string. usage: | diff --git a/commands/docs/url_join.md b/commands/docs/url_join.md index c660293f0af..a1d196a3bfb 100644 --- a/commands/docs/url_join.md +++ b/commands/docs/url_join.md @@ -2,7 +2,7 @@ title: url join categories: | network -version: 0.103.0 +version: 0.104.0 network: | Converts a record to url. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | ------ | | record | string | - ## Examples Outputs a url representing the contents of this record, `params` and `query` fields must be equivalent diff --git a/commands/docs/url_parse.md b/commands/docs/url_parse.md index b067add1980..ef727a1947e 100644 --- a/commands/docs/url_parse.md +++ b/commands/docs/url_parse.md @@ -2,7 +2,7 @@ title: url parse categories: | network -version: 0.103.0 +version: 0.104.0 network: | Parses a url. usage: | diff --git a/commands/docs/url_split-query.md b/commands/docs/url_split-query.md index cf44a3012bc..22acd219b77 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.103.0 +version: 0.104.0 network: | Converts query string into table applying percent-decoding. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------ | --------------------------------- | | string | table\ | - ## Examples Outputs a table representing the contents of this query string diff --git a/commands/docs/use.md b/commands/docs/use.md index 2e63815ee59..86f937e215c 100644 --- a/commands/docs/use.md +++ b/commands/docs/use.md @@ -2,7 +2,7 @@ title: use categories: | core -version: 0.103.0 +version: 0.104.0 core: | Use definitions from a module, making them available in your shell. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Define a custom command in a module and call it diff --git a/commands/docs/values.md b/commands/docs/values.md index 223819374b1..ec767967265 100644 --- a/commands/docs/values.md +++ b/commands/docs/values.md @@ -2,7 +2,7 @@ title: values categories: | filters -version: 0.103.0 +version: 0.104.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 d3a793dcb90..4c9db257fd8 100644 --- a/commands/docs/version.md +++ b/commands/docs/version.md @@ -2,7 +2,7 @@ title: version categories: | core -version: 0.103.0 +version: 0.104.0 core: | Display Nu version, and its build configuration. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | record | - ## Examples Display Nu version @@ -40,4 +39,4 @@ Display Nu version | name | description | type | | -------------------------------------------------- | -------------------------------------------------------- | -------- | -| [`version check`](/commands/docs/version_check.md) | Checks to see if you have the latest version of nushell. | built-in | +| [`version check`](/commands/docs/version_check.md) | Checks to see if you have the latest version of nushell. | built-in | \ No newline at end of file diff --git a/commands/docs/version_check.md b/commands/docs/version_check.md index 527a85852b8..27696f065d5 100644 --- a/commands/docs/version_check.md +++ b/commands/docs/version_check.md @@ -2,7 +2,7 @@ title: version check categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Checks to see if you have the latest version of nushell. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Check if you have the latest version of nushell diff --git a/commands/docs/view.md b/commands/docs/view.md index f0d09d6bf50..38e1005bada 100644 --- a/commands/docs/view.md +++ b/commands/docs/view.md @@ -2,7 +2,7 @@ title: view categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | Various commands for viewing debug information. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes You must use one of the following subcommands. Using this command as-is will only produce this help message. diff --git a/commands/docs/view_blocks.md b/commands/docs/view_blocks.md index da27fb97320..a9e1fbe751e 100644 --- a/commands/docs/view_blocks.md +++ b/commands/docs/view_blocks.md @@ -2,7 +2,7 @@ title: view blocks categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View the blocks registered in nushell's EngineState memory. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ----------------------------------------------------------- | | nothing | table\ | - ## Examples View the blocks registered in Nushell's EngineState memory diff --git a/commands/docs/view_files.md b/commands/docs/view_files.md index f7f43d7a1cc..ea675fd8d28 100644 --- a/commands/docs/view_files.md +++ b/commands/docs/view_files.md @@ -2,7 +2,7 @@ title: view files categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View the files registered in nushell's EngineState memory. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | -------------------------------------------------------- | | nothing | table\ | - ## Examples View the files registered in Nushell's EngineState memory diff --git a/commands/docs/view_ir.md b/commands/docs/view_ir.md index acf0a1d4916..12006ba9c0d 100644 --- a/commands/docs/view_ir.md +++ b/commands/docs/view_ir.md @@ -2,7 +2,7 @@ title: view ir categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View the compiled IR code for a block of code. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Notes The target can be a closure, the name of a custom command, or an internal block ID. Closure literals within IR dumps often reference the block by ID (e.g. diff --git a/commands/docs/view_source.md b/commands/docs/view_source.md index d52795f2963..50df74fc675 100644 --- a/commands/docs/view_source.md +++ b/commands/docs/view_source.md @@ -2,7 +2,7 @@ title: view source categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View a block, module, or a definition. usage: | @@ -30,7 +30,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples View the source of a code block diff --git a/commands/docs/view_span.md b/commands/docs/view_span.md index b3ffddd1234..96855efad5a 100644 --- a/commands/docs/view_span.md +++ b/commands/docs/view_span.md @@ -2,7 +2,7 @@ title: view span categories: | debug -version: 0.103.0 +version: 0.104.0 debug: | View the contents of a span. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples View the source of a span. 1 and 2 are just example values. Use the return of debug --raw to get the actual values diff --git a/commands/docs/watch.md b/commands/docs/watch.md index 4b3a3acbf61..1f8164af20c 100644 --- a/commands/docs/watch.md +++ b/commands/docs/watch.md @@ -2,7 +2,7 @@ title: watch categories: | filesystem -version: 0.103.0 +version: 0.104.0 filesystem: | Watch for file changes and execute Nu code when they happen. usage: | @@ -39,7 +39,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Run `cargo test` whenever a Rust file changes diff --git a/commands/docs/where.md b/commands/docs/where.md index 7ed48bbe3b2..64ac4254529 100644 --- a/commands/docs/where.md +++ b/commands/docs/where.md @@ -2,7 +2,7 @@ title: where categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Filter values based on a row condition. usage: | diff --git a/commands/docs/which.md b/commands/docs/which.md index 87123d8d457..34dd6bd1275 100644 --- a/commands/docs/which.md +++ b/commands/docs/which.md @@ -2,7 +2,7 @@ title: which categories: | system -version: 0.103.0 +version: 0.104.0 system: | Finds a program file, alias or custom command. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | table | - ## Examples Find if the 'myapp' application is available diff --git a/commands/docs/while.md b/commands/docs/while.md index b020cc6402b..5b0eec73436 100644 --- a/commands/docs/while.md +++ b/commands/docs/while.md @@ -2,7 +2,7 @@ title: while categories: | core -version: 0.103.0 +version: 0.104.0 core: | Conditionally run a block in a loop. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ------- | ------- | | nothing | nothing | - ## Examples Loop while a condition is true diff --git a/commands/docs/whoami.md b/commands/docs/whoami.md index 50f5cb948b1..a7a83bd600b 100644 --- a/commands/docs/whoami.md +++ b/commands/docs/whoami.md @@ -2,7 +2,7 @@ title: whoami categories: | platform -version: 0.103.0 +version: 0.104.0 platform: | Get the current username using uutils/coreutils whoami. usage: | @@ -26,7 +26,6 @@ contributors: false | input | output | | ------- | ------ | | nothing | string | - ## Examples Get the current username diff --git a/commands/docs/window.md b/commands/docs/window.md index 4a4707471e6..6cf6c8de5ce 100644 --- a/commands/docs/window.md +++ b/commands/docs/window.md @@ -2,7 +2,7 @@ title: window categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Creates a sliding window of `window_size` that slide by n rows/elements across input. usage: | @@ -35,7 +35,6 @@ contributors: false | input | output | | --------- | --------------- | | list\ | list\\> | - ## Examples A sliding window of two elements diff --git a/commands/docs/with-env.md b/commands/docs/with-env.md index 00998bd1056..470f5d9ff0f 100644 --- a/commands/docs/with-env.md +++ b/commands/docs/with-env.md @@ -2,7 +2,7 @@ title: with-env categories: | env -version: 0.103.0 +version: 0.104.0 env: | Runs a block with an environment variable set. usage: | @@ -31,7 +31,6 @@ contributors: false | input | output | | ----- | ------ | | any | any | - ## Examples Set by key-value record diff --git a/commands/docs/wrap.md b/commands/docs/wrap.md index f5c2a49cef1..91a87f89c9f 100644 --- a/commands/docs/wrap.md +++ b/commands/docs/wrap.md @@ -2,7 +2,7 @@ title: wrap categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Wrap the value into a column. usage: | diff --git a/commands/docs/zip.md b/commands/docs/zip.md index c260cf17284..b5bd0b0fd29 100644 --- a/commands/docs/zip.md +++ b/commands/docs/zip.md @@ -2,7 +2,7 @@ title: zip categories: | filters -version: 0.103.0 +version: 0.104.0 filters: | Combine a stream with the input. usage: |