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