mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 07:02:19 +01:00
name change (#526)
This commit is contained in:
parent
2883d6cd1e
commit
038ad951da
@ -31,9 +31,9 @@ impl CumType {
|
|||||||
|
|
||||||
fn to_str(&self) -> &'static str {
|
fn to_str(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
CumType::Min => "cum_min",
|
CumType::Min => "cumulative_min",
|
||||||
CumType::Max => "cum_max",
|
CumType::Max => "cumulative_max",
|
||||||
CumType::Sum => "cum_sum",
|
CumType::Sum => "cumulative_sum",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ pub struct Cumulative;
|
|||||||
|
|
||||||
impl Command for Cumulative {
|
impl Command for Cumulative {
|
||||||
fn name(&self) -> &str {
|
fn name(&self) -> &str {
|
||||||
"dfr cum"
|
"dfr cumulative"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn usage(&self) -> &str {
|
||||||
@ -60,10 +60,10 @@ impl Command for Cumulative {
|
|||||||
fn examples(&self) -> Vec<Example> {
|
fn examples(&self) -> Vec<Example> {
|
||||||
vec![Example {
|
vec![Example {
|
||||||
description: "Cumulative sum for a series",
|
description: "Cumulative sum for a series",
|
||||||
example: "[1 2 3 4 5] | dfr to-df | dfr cum sum",
|
example: "[1 2 3 4 5] | dfr to-df | dfr cumulative sum",
|
||||||
result: Some(
|
result: Some(
|
||||||
NuDataFrame::try_from_columns(vec![Column::new(
|
NuDataFrame::try_from_columns(vec![Column::new(
|
||||||
"0_cum_sum".to_string(),
|
"0_cumulative_sum".to_string(),
|
||||||
vec![
|
vec![
|
||||||
Value::test_int(1),
|
Value::test_int(1),
|
||||||
Value::test_int(3),
|
Value::test_int(3),
|
||||||
|
@ -114,7 +114,7 @@ def process_call(plugin_call):
|
|||||||
Use this information to implement your plugin logic
|
Use this information to implement your plugin logic
|
||||||
"""
|
"""
|
||||||
# Pretty printing the call to stderr
|
# Pretty printing the call to stderr
|
||||||
sys.stderr.write(f"{json.dumps(plugin_call, indent=4)}")
|
sys.stderr.write(json.dumps(plugin_call, indent=4))
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
|
|
||||||
# Creates a Value of type List that will be encoded and sent to nushell
|
# Creates a Value of type List that will be encoded and sent to nushell
|
||||||
|
Loading…
Reference in New Issue
Block a user