forked from extern/nushell
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:
@ -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()
|
||||
)),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user