2021-01-12 05:59:53 +01:00
|
|
|
[package]
|
2022-03-22 21:25:38 +01:00
|
|
|
authors = ["The Nushell Project Developers"]
|
2022-04-11 20:17:06 +02:00
|
|
|
description = "Nushell's built-in commands"
|
2022-08-14 14:21:20 +02:00
|
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
|
2022-03-22 21:25:38 +01:00
|
|
|
edition = "2021"
|
|
|
|
license = "MIT"
|
2021-01-12 05:59:53 +01:00
|
|
|
name = "nu-command"
|
2023-01-31 23:55:29 +01:00
|
|
|
version = "0.75.1"
|
2021-12-11 21:08:17 +01:00
|
|
|
build = "build.rs"
|
|
|
|
|
2021-09-02 03:29:43 +02:00
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
|
|
|
|
[dependencies]
|
2023-01-31 23:55:29 +01:00
|
|
|
nu-color-config = { path = "../nu-color-config", version = "0.75.1" }
|
|
|
|
nu-engine = { path = "../nu-engine", version = "0.75.1" }
|
|
|
|
nu-glob = { path = "../nu-glob", version = "0.75.1" }
|
|
|
|
nu-json = { path = "../nu-json", version = "0.75.1" }
|
|
|
|
nu-parser = { path = "../nu-parser", version = "0.75.1" }
|
|
|
|
nu-path = { path = "../nu-path", version = "0.75.1" }
|
|
|
|
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.75.1" }
|
|
|
|
nu-protocol = { path = "../nu-protocol", version = "0.75.1" }
|
|
|
|
nu-system = { path = "../nu-system", version = "0.75.1" }
|
|
|
|
nu-table = { path = "../nu-table", version = "0.75.1" }
|
|
|
|
nu-term-grid = { path = "../nu-term-grid", version = "0.75.1" }
|
|
|
|
nu-utils = { path = "../nu-utils", version = "0.75.1" }
|
|
|
|
nu-explore = { path = "../nu-explore", version = "0.75.1" }
|
2022-06-03 21:38:54 +02:00
|
|
|
nu-ansi-term = "0.46.0"
|
2022-10-10 13:25:57 +02:00
|
|
|
num-format = { version = "0.4.3" }
|
2021-09-10 03:06:44 +02:00
|
|
|
|
|
|
|
# Potential dependencies for extras
|
2022-05-06 14:58:32 +02:00
|
|
|
alphanumeric-sort = "1.4.4"
|
2022-12-15 15:47:04 +01:00
|
|
|
atty = "0.2.14"
|
2023-01-13 14:16:14 +01:00
|
|
|
base64 = "0.21.0"
|
2022-07-03 20:31:50 +02:00
|
|
|
byteorder = "1.4.3"
|
2022-02-03 18:35:06 +01:00
|
|
|
bytesize = "1.1.0"
|
2022-12-01 20:25:13 +01:00
|
|
|
calamine = "0.19.1"
|
2023-01-23 19:57:40 +01:00
|
|
|
chrono = { version = "0.4.23", features = ["unstable-locales", "std"], default-features = false }
|
2021-10-31 07:54:51 +01:00
|
|
|
chrono-humanize = "0.2.1"
|
2023-01-30 02:38:39 +01:00
|
|
|
chrono-tz = "0.8.1"
|
2022-07-30 11:41:15 +02:00
|
|
|
crossterm = "0.24.0"
|
2022-03-24 18:59:27 +01:00
|
|
|
csv = "1.1.6"
|
2023-01-16 03:04:47 +01:00
|
|
|
dialoguer = { default-features = false, version = "0.10.3" }
|
2022-11-12 06:44:56 +01:00
|
|
|
digest = { default-features = false, version = "0.10.0" }
|
2021-12-04 04:41:02 +01:00
|
|
|
dtparse = "1.2.0"
|
2022-02-03 18:35:06 +01:00
|
|
|
eml-parser = "0.1.0"
|
|
|
|
encoding_rs = "0.8.30"
|
2023-01-23 19:57:40 +01:00
|
|
|
fancy-regex = "0.11.0"
|
2022-02-03 18:35:06 +01:00
|
|
|
filesize = "0.2.0"
|
2022-04-07 13:44:05 +02:00
|
|
|
filetime = "0.2.15"
|
2023-02-06 10:59:58 +01:00
|
|
|
fs_extra = "1.3.0"
|
2021-01-12 05:59:53 +01:00
|
|
|
htmlescape = "0.3.1"
|
2023-02-09 19:37:51 +01:00
|
|
|
ical = "0.8.0"
|
2023-01-13 14:16:14 +01:00
|
|
|
indexmap = { version = "1.7", features = ["serde-1"] }
|
2023-01-11 02:57:48 +01:00
|
|
|
indicatif = "0.17.2"
|
2022-02-03 18:35:06 +01:00
|
|
|
Inflector = "0.11"
|
2022-06-06 13:55:23 +02:00
|
|
|
is-root = "0.1.2"
|
2022-02-03 18:35:06 +01:00
|
|
|
itertools = "0.10.0"
|
|
|
|
log = "0.4.14"
|
2023-01-23 19:57:40 +01:00
|
|
|
lscolors = { version = "0.12.0", features = ["crossterm"], default-features = false }
|
2022-02-03 18:35:06 +01:00
|
|
|
md5 = { package = "md-5", version = "0.10.0" }
|
|
|
|
mime = "0.3.16"
|
2022-12-27 19:46:23 +01:00
|
|
|
mime_guess = "2.0.4"
|
2022-04-28 16:26:34 +02:00
|
|
|
notify = "4.0.17"
|
2022-02-03 18:35:06 +01:00
|
|
|
num = { version = "0.4.0", optional = true }
|
2022-08-02 22:52:04 +02:00
|
|
|
num-traits = "0.2.14"
|
2023-01-12 00:00:44 +01:00
|
|
|
once_cell = "1.17"
|
2023-01-03 19:47:37 +01:00
|
|
|
open = "3.2.0"
|
2022-02-03 18:35:06 +01:00
|
|
|
pathdiff = "0.2.1"
|
2022-12-29 15:55:00 +01:00
|
|
|
powierza-coefficient = "1.0.2"
|
2023-01-16 03:06:31 +01:00
|
|
|
quick-xml = "0.27"
|
2022-02-03 18:35:06 +01:00
|
|
|
rand = "0.8"
|
2023-01-23 05:52:37 +01:00
|
|
|
rayon = "1.6.1"
|
2023-01-23 02:44:10 +01:00
|
|
|
regex = "1.7.1"
|
2023-01-13 14:16:14 +01:00
|
|
|
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
2023-01-30 03:43:11 +01:00
|
|
|
roxmltree = "0.17.0"
|
2022-02-03 18:35:06 +01:00
|
|
|
rust-embed = "6.3.0"
|
2022-09-23 20:09:31 +02:00
|
|
|
same-file = "1.0.6"
|
2023-01-13 14:16:14 +01:00
|
|
|
serde = { version = "1.0.123", features = ["derive"] }
|
2023-02-09 12:47:45 +01:00
|
|
|
rust-ini = "0.18.0"
|
2022-02-03 18:35:06 +01:00
|
|
|
serde_urlencoded = "0.7.0"
|
2022-08-10 21:56:15 +02:00
|
|
|
serde_yaml = "0.9.4"
|
2022-02-03 18:35:06 +01:00
|
|
|
sha2 = "0.10.0"
|
2022-05-16 03:57:25 +02:00
|
|
|
# Disable default features b/c the default features build Git (very slow to compile)
|
2023-01-23 02:55:51 +01:00
|
|
|
shadow-rs = { version = "0.20.0", default-features = false }
|
2023-01-23 04:09:15 +01:00
|
|
|
sysinfo = "0.27.7"
|
2022-07-11 18:18:06 +02:00
|
|
|
terminal_size = "0.2.1"
|
2022-06-30 22:55:01 +02:00
|
|
|
thiserror = "1.0.31"
|
2022-07-11 18:18:06 +02:00
|
|
|
titlecase = "2.0.0"
|
A `fill` command to replace `str lpad` and `str rpad` (#7846)
# Description
The point of this command is to allow you to be able to format ints,
floats, filesizes, and strings with an alignment, padding, and a fill
character, as strings. It's meant to take the place of `str lpad` and
`str rpad`.
```
> help fill
Fill and Align
Search terms: display, render, format, pad, align
Usage:
> fill {flags}
Flags:
-h, --help - Display the help message for this command
-w, --width <Int> - The width of the output. Defaults to 1
-a, --alignment <String> - The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr))
-c, --character <String> - The character to fill with. Defaults to ' ' (space)
Signatures:
<number> | fill -> <string>
<string> | fill -> <string>
Examples:
Fill a string on the left side to a width of 15 with the character '─'
> 'nushell' | fill -a l -c '─' -w 15
Fill a string on the right side to a width of 15 with the character '─'
> 'nushell' | fill -a r -c '─' -w 15
Fill a string on both sides to a width of 15 with the character '─'
> 'nushell' | fill -a m -c '─' -w 15
Fill a number on the left side to a width of 5 with the character '0'
> 1 | fill --alignment right --character 0 --width 5
Fill a filesize on the left side to a width of 5 with the character '0'
> 1kib | fill --alignment middle --character 0 --width 10
```
![image](https://user-images.githubusercontent.com/343840/214133752-6fc93fa7-4003-4eb4-96ed-cd967312e244.png)
# User-Facing Changes
Deprecated `str lpad` and `str rpad`.
# Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass
# After Submitting
If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2023-02-09 21:56:52 +01:00
|
|
|
unicode-segmentation = "1.10.0"
|
2023-02-06 21:15:14 +01:00
|
|
|
toml = "0.7.1"
|
2022-02-03 18:35:06 +01:00
|
|
|
url = "2.2.1"
|
2023-01-05 19:24:38 +01:00
|
|
|
percent-encoding = "2.2.0"
|
2023-01-12 13:48:49 +01:00
|
|
|
uuid = { version = "1.2.2", features = ["v4"] }
|
2023-02-06 11:43:28 +01:00
|
|
|
which = { version = "4.4.0", optional = true }
|
2023-01-30 22:59:15 +01:00
|
|
|
reedline = { version = "0.15.0", features = ["bashisms", "sqlite"] }
|
2023-01-13 14:16:14 +01:00
|
|
|
wax = { version = "0.5.0" }
|
2022-07-26 04:09:32 +02:00
|
|
|
rusqlite = { version = "0.28.0", features = ["bundled"], optional = true }
|
2023-01-16 04:30:39 +01:00
|
|
|
sqlparser = { version = "0.30.0", features = ["serde"], optional = true }
|
A `fill` command to replace `str lpad` and `str rpad` (#7846)
# Description
The point of this command is to allow you to be able to format ints,
floats, filesizes, and strings with an alignment, padding, and a fill
character, as strings. It's meant to take the place of `str lpad` and
`str rpad`.
```
> help fill
Fill and Align
Search terms: display, render, format, pad, align
Usage:
> fill {flags}
Flags:
-h, --help - Display the help message for this command
-w, --width <Int> - The width of the output. Defaults to 1
-a, --alignment <String> - The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr))
-c, --character <String> - The character to fill with. Defaults to ' ' (space)
Signatures:
<number> | fill -> <string>
<string> | fill -> <string>
Examples:
Fill a string on the left side to a width of 15 with the character '─'
> 'nushell' | fill -a l -c '─' -w 15
Fill a string on the right side to a width of 15 with the character '─'
> 'nushell' | fill -a r -c '─' -w 15
Fill a string on both sides to a width of 15 with the character '─'
> 'nushell' | fill -a m -c '─' -w 15
Fill a number on the left side to a width of 5 with the character '0'
> 1 | fill --alignment right --character 0 --width 5
Fill a filesize on the left side to a width of 5 with the character '0'
> 1kib | fill --alignment middle --character 0 --width 10
```
![image](https://user-images.githubusercontent.com/343840/214133752-6fc93fa7-4003-4eb4-96ed-cd967312e244.png)
# User-Facing Changes
Deprecated `str lpad` and `str rpad`.
# Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass
# After Submitting
If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2023-02-09 21:56:52 +01:00
|
|
|
unicode-width = "0.1.10"
|
2021-05-12 03:01:31 +02:00
|
|
|
|
2022-10-07 20:54:36 +02:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
|
|
winreg = "0.10.1"
|
|
|
|
|
2021-01-12 05:59:53 +01:00
|
|
|
[target.'cfg(unix)'.dependencies]
|
2022-05-11 23:13:45 +02:00
|
|
|
umask = "2.0.0"
|
2021-02-05 21:54:54 +01:00
|
|
|
users = "0.11.0"
|
2022-11-04 19:38:39 +01:00
|
|
|
libc = "0.2"
|
2021-01-12 05:59:53 +01:00
|
|
|
|
2022-03-26 19:21:19 +01:00
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies.trash]
|
2023-01-30 11:58:56 +01:00
|
|
|
version = "3.0.1"
|
2022-03-26 19:21:19 +01:00
|
|
|
optional = true
|
|
|
|
|
2021-11-23 09:14:40 +01:00
|
|
|
[dependencies.polars]
|
2023-01-13 16:27:37 +01:00
|
|
|
version = "0.26.1"
|
2021-11-23 09:14:40 +01:00
|
|
|
optional = true
|
2021-12-18 18:45:09 +01:00
|
|
|
features = [
|
2022-08-14 14:06:31 +02:00
|
|
|
"arg_where",
|
|
|
|
"checked_arithmetic",
|
|
|
|
"concat_str",
|
|
|
|
"cross_join",
|
|
|
|
"csv-file",
|
|
|
|
"cum_agg",
|
|
|
|
"default",
|
|
|
|
"dtype-datetime",
|
|
|
|
"dtype-struct",
|
|
|
|
"dtype-categorical",
|
|
|
|
"dynamic_groupby",
|
2022-09-13 01:30:20 +02:00
|
|
|
"ipc",
|
2022-08-14 14:06:31 +02:00
|
|
|
"is_in",
|
|
|
|
"json",
|
|
|
|
"lazy",
|
|
|
|
"object",
|
|
|
|
"parquet",
|
|
|
|
"random",
|
|
|
|
"rolling_window",
|
|
|
|
"rows",
|
|
|
|
"serde",
|
|
|
|
"serde-lazy",
|
|
|
|
"strings",
|
|
|
|
"strings",
|
|
|
|
"to_dummies",
|
2021-12-18 18:45:09 +01:00
|
|
|
]
|
2021-11-23 09:14:40 +01:00
|
|
|
|
2022-06-03 18:37:27 +02:00
|
|
|
[target.'cfg(windows)'.dependencies.windows]
|
2023-01-30 03:17:18 +01:00
|
|
|
version = "0.44.0"
|
2023-01-23 19:57:40 +01:00
|
|
|
features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_SystemServices"]
|
2022-06-03 18:37:27 +02:00
|
|
|
|
2021-10-10 06:13:15 +02:00
|
|
|
[features]
|
|
|
|
trash-support = ["trash"]
|
2022-03-30 20:37:31 +02:00
|
|
|
which-support = ["which"]
|
2021-11-02 21:56:00 +01:00
|
|
|
plugin = ["nu-parser/plugin"]
|
2022-11-09 23:14:48 +01:00
|
|
|
dataframe = ["polars", "num", "sqlparser"]
|
2023-01-23 19:57:40 +01:00
|
|
|
sqlite = ["rusqlite"] # TODO: given that rusqlite is included in reedline, should we just always include it?
|
2021-01-12 05:59:53 +01:00
|
|
|
|
|
|
|
[build-dependencies]
|
2023-01-23 02:55:51 +01:00
|
|
|
shadow-rs = { version = "0.20.0", default-features = false }
|
2021-01-12 05:59:53 +01:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-01-31 23:55:29 +01:00
|
|
|
nu-test-support = { path = "../nu-test-support", version = "0.75.1" }
|
2022-10-29 19:39:27 +02:00
|
|
|
|
2022-02-02 21:59:01 +01:00
|
|
|
hamcrest2 = "0.3.0"
|
|
|
|
dirs-next = "2.0.0"
|
2022-09-01 14:08:19 +02:00
|
|
|
proptest = "1.0.0"
|
2022-02-02 21:59:01 +01:00
|
|
|
quickcheck = "1.0.3"
|
2022-02-04 07:47:18 +01:00
|
|
|
quickcheck_macros = "1.0.0"
|
2023-01-13 14:16:14 +01:00
|
|
|
rstest = { version = "0.15.0", default-features = false }
|