File tree 9 files changed +465
-0
lines changed
9 files changed +465
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : bytes split
3
+ categories : |
4
+ bytes
5
+ version : 0.102.0
6
+ bytes : |
7
+ Split input into multiple items using a separator.
8
+ usage : |
9
+ Split input into multiple items using a separator.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` bytes split ` for [ bytes] ( /commands/categories/bytes.md )
16
+
17
+ <div class =' command-title ' >Split input into multiple items using a separator.</div >
18
+
19
+ ## Signature
20
+
21
+ ``` > bytes split {flags} (separator) ```
22
+
23
+ ## Parameters
24
+
25
+ - ` separator ` : Bytes or string that the input will be split on (must be non-empty).
26
+
27
+
28
+ ## Input/output types:
29
+
30
+ | input | output |
31
+ | ------ | ------------ |
32
+ | binary | list\< binary\> |
33
+
34
+ ## Examples
35
+
36
+ Split a binary value using a binary separator
37
+ ``` nu
38
+ > 0x[66 6F 6F 20 62 61 72 20 62 61 7A 20] | bytes split 0x[20]
39
+ ╭───┬─────────────────╮
40
+ │ 0 │ [102, 111, 111] │
41
+ │ 1 │ [98, 97, 114] │
42
+ │ 2 │ [98, 97, 122] │
43
+ │ 3 │ [] │
44
+ ╰───┴─────────────────╯
45
+
46
+ ```
47
+
48
+ Split a binary value using a string separator
49
+ ``` nu
50
+ > 0x[61 2D 2D 62 2D 2D 63] | bytes split "--"
51
+ ╭───┬──────╮
52
+ │ 0 │ [97] │
53
+ │ 1 │ [98] │
54
+ │ 2 │ [99] │
55
+ ╰───┴──────╯
56
+
57
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : config use-colors
3
+ categories : |
4
+ env
5
+ version : 0.102.0
6
+ env : |
7
+ Get the configuration for color output.
8
+ usage : |
9
+ Get the configuration for color output.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` config use-colors ` for [ env] ( /commands/categories/env.md )
16
+
17
+ <div class =' command-title ' >Get the configuration for color output.</div >
18
+
19
+ ## Signature
20
+
21
+ ``` > config use-colors {flags} ```
22
+
23
+
24
+ ## Input/output types:
25
+
26
+ | input | output |
27
+ | ------- | ------ |
28
+ | nothing | bool |
29
+
30
+ ## Notes
31
+ Use this command instead of checking ` $env.config.use_ansi_coloring ` to properly handle the "auto" setting, including environment variables that influence its behavior.
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : format bits
3
+ categories : |
4
+ conversions
5
+ version : 0.102.0
6
+ conversions : |
7
+ Convert value to a string of binary data represented by 0 and 1.
8
+ usage : |
9
+ Convert value to a string of binary data represented by 0 and 1.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` format bits ` for [ conversions] ( /commands/categories/conversions.md )
16
+
17
+ <div class =' command-title ' >Convert value to a string of binary data represented by 0 and 1.</div >
18
+
19
+ ## Signature
20
+
21
+ ``` > format bits {flags} ...rest ```
22
+
23
+ ## Parameters
24
+
25
+ - ` ...rest ` : for a data structure input, convert data at the given cell paths
26
+
27
+
28
+ ## Input/output types:
29
+
30
+ | input | output |
31
+ | -------- | ------ |
32
+ | binary | string |
33
+ | bool | string |
34
+ | duration | string |
35
+ | filesize | string |
36
+ | int | string |
37
+ | record | record |
38
+ | string | string |
39
+ | table | table |
40
+ ## Examples
41
+
42
+ convert a binary value into a string, padded to 8 places with 0s
43
+ ``` nu
44
+ > 0x[1] | format bits
45
+ 00000001
46
+ ```
47
+
48
+ convert an int into a string, padded to 8 places with 0s
49
+ ``` nu
50
+ > 1 | format bits
51
+ 00000001
52
+ ```
53
+
54
+ convert a filesize value into a string, padded to 8 places with 0s
55
+ ``` nu
56
+ > 1b | format bits
57
+ 00000001
58
+ ```
59
+
60
+ convert a duration value into a string, padded to 8 places with 0s
61
+ ``` nu
62
+ > 1ns | format bits
63
+ 00000001
64
+ ```
65
+
66
+ convert a boolean value into a string, padded to 8 places with 0s
67
+ ``` nu
68
+ > true | format bits
69
+ 00000001
70
+ ```
71
+
72
+ convert a string into a raw binary string, padded with 0s to 8 places
73
+ ``` nu
74
+ > 'nushell.sh' | format bits
75
+ 01101110 01110101 01110011 01101000 01100101 01101100 01101100 00101110 01110011 01101000
76
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : format number
3
+ categories : |
4
+ conversions
5
+ version : 0.102.0
6
+ conversions : |
7
+ Format a number.
8
+ usage : |
9
+ Format a number.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` format number ` for [ conversions] ( /commands/categories/conversions.md )
16
+
17
+ <div class =' command-title ' >Format a number.</div >
18
+
19
+ ## Signature
20
+
21
+ ``` > format number {flags} ```
22
+
23
+
24
+ ## Input/output types:
25
+
26
+ | input | output |
27
+ | ------ | ------ |
28
+ | number | record |
29
+
30
+ ## Examples
31
+
32
+ Get a record containing multiple formats for the number 42
33
+ ``` nu
34
+ > 42 | format number
35
+ ╭──────────┬──────────╮
36
+ │ binary │ 0b101010 │
37
+ │ debug │ 42 │
38
+ │ display │ 42 │
39
+ │ lowerexp │ 4.2e1 │
40
+ │ lowerhex │ 0x2a │
41
+ │ octal │ 0o52 │
42
+ │ upperexp │ 4.2E1 │
43
+ │ upperhex │ 0x2A │
44
+ ╰──────────┴──────────╯
45
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : help pipe-and-redirect
3
+ categories : |
4
+ core
5
+ version : 0.102.0
6
+ core : |
7
+ Show help on nushell pipes and redirects.
8
+ usage : |
9
+ Show help on nushell pipes and redirects.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` help pipe-and-redirect ` for [ core] ( /commands/categories/core.md )
16
+
17
+ <div class =' command-title ' >Show help on nushell pipes and redirects.</div >
18
+
19
+ ## Signature
20
+
21
+ ``` > help pipe-and-redirect {flags} ```
22
+
23
+
24
+ ## Input/output types:
25
+
26
+ | input | output |
27
+ | ------- | ------ |
28
+ | nothing | table |
29
+
30
+ ## Notes
31
+ This command contains basic usage of pipe and redirect symbol, for more detail, check:
32
+ https://www.nushell.sh/lang-guide/chapters/pipelines.html
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : polars into-repr
3
+ categories : |
4
+ dataframe
5
+ version : 0.102.0
6
+ dataframe : |
7
+ Display a dataframe in its repr format.
8
+ usage : |
9
+ Display a dataframe in its repr format.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` polars into-repr ` for [ dataframe] ( /commands/categories/dataframe.md )
16
+
17
+ <div class =' command-title ' >Display a dataframe in its repr format.</div >
18
+
19
+ ::: warning This command requires a plugin
20
+ The ` polars into-repr ` command resides in the ` polars ` plugin.
21
+ To use this command, you must install and register ` nu_plugin_polars ` .
22
+ See the [ Plugins] ( /book/plugins.html ) chapter in the book for more information.
23
+ :::
24
+
25
+
26
+ ## Signature
27
+
28
+ ``` > polars into-repr {flags} ```
29
+
30
+
31
+ ## Input/output types:
32
+
33
+ | input | output |
34
+ | ----- | ------ |
35
+ | any | string |
36
+
37
+ ## Examples
38
+
39
+ Shows dataframe in repr format
40
+ ``` nu
41
+ > [[a b]; [2025-01-01 2] [2025-01-02 4]] | polars into-df | polars into-repr
42
+ shape: (2, 2)
43
+ ┌─────────────────────┬─────┐
44
+ │ a ┆ b │
45
+ │ --- ┆ --- │
46
+ │ datetime[ns] ┆ i64 │
47
+ ╞═════════════════════╪═════╡
48
+ │ 2025-01-01 00:00:00 ┆ 2 │
49
+ │ 2025-01-02 00:00:00 ┆ 4 │
50
+ └─────────────────────┴─────┘
51
+ ```
52
+
53
+ Shows lazy dataframe in repr format
54
+ ``` nu
55
+ > [[a b]; [2025-01-01 2] [2025-01-02 4]] | polars into-df | polars into-lazy | polars into-repr
56
+ shape: (2, 2)
57
+ ┌─────────────────────┬─────┐
58
+ │ a ┆ b │
59
+ │ --- ┆ --- │
60
+ │ datetime[ns] ┆ i64 │
61
+ ╞═════════════════════╪═════╡
62
+ │ 2025-01-01 00:00:00 ┆ 2 │
63
+ │ 2025-01-02 00:00:00 ┆ 4 │
64
+ └─────────────────────┴─────┘
65
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : polars str-split
3
+ categories : |
4
+ dataframe
5
+ version : 0.102.0
6
+ dataframe : |
7
+ Split the string by a substring. The resulting dtype is list<str>.
8
+ usage : |
9
+ Split the string by a substring. The resulting dtype is list<str>.
10
+ editLink : false
11
+ contributors : false
12
+ ---
13
+ <!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
14
+
15
+ # ` polars str-split ` for [ dataframe] ( /commands/categories/dataframe.md )
16
+
17
+ <div class =' command-title ' >Split the string by a substring. The resulting dtype is list< ; str> ; .</div >
18
+
19
+ ::: warning This command requires a plugin
20
+ The ` polars str-split ` command resides in the ` polars ` plugin.
21
+ To use this command, you must install and register ` nu_plugin_polars ` .
22
+ See the [ Plugins] ( /book/plugins.html ) chapter in the book for more information.
23
+ :::
24
+
25
+
26
+ ## Signature
27
+
28
+ ``` > polars str-split {flags} (expr) ```
29
+
30
+ ## Parameters
31
+
32
+ - ` expr ` : Separator expression
33
+
34
+
35
+ ## Input/output types:
36
+
37
+ | input | output |
38
+ | ----- | ------ |
39
+ | any | any |
40
+
41
+ ## Examples
42
+
43
+ Split the string by comma, then create a new row for each string
44
+ ``` nu
45
+ > [[a]; ["one,two,three"]] | polars into-df
46
+ | polars select (polars col a | polars str-split "," | polars explode)
47
+ | polars collect
48
+ ╭───┬───────╮
49
+ │ # │ a │
50
+ ├───┼───────┤
51
+ │ 0 │ one │
52
+ │ 1 │ two │
53
+ │ 2 │ three │
54
+ ╰───┴───────╯
55
+
56
+ ```
You can’t perform that action at this time.
0 commit comments