forked from extern/nushell
changed to-float to to-decimal (#1926)
* changed to-float to to-decimal * changed to-float to to-decimal
This commit is contained in:
@ -5,7 +5,7 @@ mod find_replace;
|
||||
mod set;
|
||||
mod substring;
|
||||
mod to_datetime;
|
||||
mod to_float;
|
||||
mod to_decimal;
|
||||
mod to_integer;
|
||||
mod trim;
|
||||
mod upcase;
|
||||
@ -17,7 +17,7 @@ pub use find_replace::SubCommand as StrFindReplace;
|
||||
pub use set::SubCommand as StrSet;
|
||||
pub use substring::SubCommand as StrSubstring;
|
||||
pub use to_datetime::SubCommand as StrToDatetime;
|
||||
pub use to_float::SubCommand as StrToFloat;
|
||||
pub use to_decimal::SubCommand as StrToDecimal;
|
||||
pub use to_integer::SubCommand as StrToInteger;
|
||||
pub use trim::SubCommand as StrTrim;
|
||||
pub use upcase::SubCommand as StrUpcase;
|
||||
|
@ -21,18 +21,18 @@ pub struct SubCommand;
|
||||
#[async_trait]
|
||||
impl WholeStreamCommand for SubCommand {
|
||||
fn name(&self) -> &str {
|
||||
"str to-float"
|
||||
"str to-decimal"
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("str to-float").rest(
|
||||
Signature::build("str to-decimal").rest(
|
||||
SyntaxShape::ColumnPath,
|
||||
"optionally convert text into float by column paths",
|
||||
"optionally convert text into decimal by column paths",
|
||||
)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"converts text into float"
|
||||
"converts text into decimal"
|
||||
}
|
||||
|
||||
async fn run(
|
||||
@ -45,8 +45,8 @@ impl WholeStreamCommand for SubCommand {
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Convert to float",
|
||||
example: "echo '3.1415' | str to-float",
|
||||
description: "Convert to decimal",
|
||||
example: "echo '3.1415' | str to-decimal",
|
||||
result: None,
|
||||
}]
|
||||
}
|
Reference in New Issue
Block a user