forked from extern/nushell
Cleanup/rename some commands
This commit is contained in:
parent
de47e3cf90
commit
1012a8dc41
@ -25,8 +25,8 @@ Nu currently has the following built-in commands:
|
|||||||
- to-json
|
- to-json
|
||||||
- from-json
|
- from-json
|
||||||
- open filename
|
- open filename
|
||||||
- column-split sep ...fields
|
- split-column sep ...fields
|
||||||
- row-split sep ...fields
|
- split-row sep ...fields
|
||||||
- select field
|
- select field
|
||||||
|
|
||||||
# Goals
|
# Goals
|
||||||
|
@ -52,8 +52,8 @@ pub async fn cli() -> Result<(), Box<Error>> {
|
|||||||
command("from-json", from_json::from_json),
|
command("from-json", from_json::from_json),
|
||||||
command("open", open::open),
|
command("open", open::open),
|
||||||
command("column", column::column),
|
command("column", column::column),
|
||||||
command("column-split", col_split::col_split),
|
command("split-column", split_column::split_column),
|
||||||
command("row-split", row_split::row_split),
|
command("split-row", split_row::split_row),
|
||||||
command("reject", reject::reject),
|
command("reject", reject::reject),
|
||||||
command("select", select::select),
|
command("select", select::select),
|
||||||
command("to-array", to_array::to_array),
|
command("to-array", to_array::to_array),
|
||||||
|
@ -12,8 +12,8 @@ crate mod select;
|
|||||||
crate mod size;
|
crate mod size;
|
||||||
crate mod skip;
|
crate mod skip;
|
||||||
crate mod sort_by;
|
crate mod sort_by;
|
||||||
crate mod col_split;
|
crate mod split_column;
|
||||||
crate mod row_split;
|
crate mod split_row;
|
||||||
crate mod take;
|
crate mod take;
|
||||||
crate mod to_array;
|
crate mod to_array;
|
||||||
crate mod to_json;
|
crate mod to_json;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use crate::errors::ShellError;
|
use crate::errors::ShellError;
|
||||||
use crate::object::Value;
|
use crate::object::Value;
|
||||||
use crate::object::base::select_fields;
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
fn get_member(path: &str, obj: &Value) -> Option<Value> {
|
fn get_member(path: &str, obj: &Value) -> Option<Value> {
|
||||||
|
@ -5,8 +5,7 @@ use log::debug;
|
|||||||
|
|
||||||
// TODO: "Amount remaining" wrapper
|
// TODO: "Amount remaining" wrapper
|
||||||
|
|
||||||
pub fn col_split(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
pub fn split_column(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||||
//let splitter = args.args[0].as_string()?;
|
|
||||||
let input = args.input;
|
let input = args.input;
|
||||||
let args = args.args;
|
let args = args.args;
|
||||||
|
|
@ -5,8 +5,7 @@ use log::debug;
|
|||||||
|
|
||||||
// TODO: "Amount remaining" wrapper
|
// TODO: "Amount remaining" wrapper
|
||||||
|
|
||||||
pub fn row_split(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
pub fn split_row(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||||
//let splitter = args.args[0].as_string()?;
|
|
||||||
let input = args.input;
|
let input = args.input;
|
||||||
let args = args.args;
|
let args = args.args;
|
||||||
|
|
||||||
@ -26,8 +25,7 @@ pub fn row_split(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let mut result = VecDeque::new();
|
let result = VecDeque::new();
|
||||||
//result.push_back(ReturnValue::Value(Value::Object(crate::object::Dictionary::default())));
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user