mirror of
https://github.com/nushell/nushell.git
synced 2024-12-01 21:03:58 +01:00
K raw unit is a kilobyte.
This commit is contained in:
parent
59115a532f
commit
520ab55756
@ -217,6 +217,8 @@ pub fn raw_unit(input: NomSpan) -> IResult<NomSpan, Spanned<Unit>> {
|
|||||||
tag("KB"),
|
tag("KB"),
|
||||||
tag("kb"),
|
tag("kb"),
|
||||||
tag("Kb"),
|
tag("Kb"),
|
||||||
|
tag("K"),
|
||||||
|
tag("k"),
|
||||||
tag("MB"),
|
tag("MB"),
|
||||||
tag("mb"),
|
tag("mb"),
|
||||||
tag("Mb"),
|
tag("Mb"),
|
||||||
|
@ -46,8 +46,8 @@ impl FromStr for Unit {
|
|||||||
type Err = ();
|
type Err = ();
|
||||||
fn from_str(input: &str) -> Result<Self, <Self as std::str::FromStr>::Err> {
|
fn from_str(input: &str) -> Result<Self, <Self as std::str::FromStr>::Err> {
|
||||||
match input {
|
match input {
|
||||||
"B" | "b" => Ok(Unit::B),
|
"B" | "b" => Ok(Unit::B),
|
||||||
"KB" | "kb" | "Kb" => Ok(Unit::KB),
|
"KB" | "kb" | "Kb" | "K" | "k" => Ok(Unit::KB),
|
||||||
"MB" | "mb" | "Mb" => Ok(Unit::MB),
|
"MB" | "mb" | "Mb" => Ok(Unit::MB),
|
||||||
"GB" | "gb" | "Gb" => Ok(Unit::GB),
|
"GB" | "gb" | "Gb" => Ok(Unit::GB),
|
||||||
"TB" | "tb" | "Tb" => Ok(Unit::TB),
|
"TB" | "tb" | "Tb" => Ok(Unit::TB),
|
||||||
|
Loading…
Reference in New Issue
Block a user