mirror of
https://github.com/nushell/nushell.git
synced 2025-05-28 14:07:08 +02:00
Feature+: Bracoxide Zero Padding for Numeric Ranges (#15125)
adds feature spécified in bracoxide#6 ``` $ echo {01..10} 01 02 03 04 05 06 07 08 09 10 $ echo {1..010} 001 002 003 004 005 006 007 008 009 010 ``` I'm going to update the examples, but I'm currently on mobile. Will land in a couple of days.
This commit is contained in:
parent
f8ac9db15b
commit
8b46ba8b6b
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -752,9 +752,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bracoxide"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbc0bcb5424e8e1f29c21a00f2d222df5e8e9779732ff03f840315d8fbac708e"
|
||||
checksum = "7f52991c481aa9d7518254cfb6ce5726d24ff8c5d383d6422cd3793729b0962a"
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
|
@ -66,7 +66,7 @@ alphanumeric-sort = "1.5"
|
||||
ansi-str = "0.8"
|
||||
anyhow = "1.0.82"
|
||||
base64 = "0.22.1"
|
||||
bracoxide = "0.1.4"
|
||||
bracoxide = "0.1.5"
|
||||
brotli = "7.0"
|
||||
byteorder = "1.5"
|
||||
bytes = "1"
|
||||
|
@ -175,6 +175,25 @@ impl Command for SubCommand {
|
||||
],
|
||||
Span::test_data()
|
||||
)),
|
||||
},
|
||||
|
||||
Example {
|
||||
description: "Supports zero padding in numeric ranges.",
|
||||
example: "\"A{08..10}B{11..013}C\" | str expand",
|
||||
result: Some(Value::list(
|
||||
vec![
|
||||
Value::test_string("A08B011C"),
|
||||
Value::test_string("A08B012C"),
|
||||
Value::test_string("A08B013C"),
|
||||
Value::test_string("A09B011C"),
|
||||
Value::test_string("A09B012C"),
|
||||
Value::test_string("A09B013C"),
|
||||
Value::test_string("A10B011C"),
|
||||
Value::test_string("A10B012C"),
|
||||
Value::test_string("A10B013C"),
|
||||
],
|
||||
Span::test_data()
|
||||
)),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user