Rename select to get

This commit is contained in:
Jonathan Turner 2019-06-05 13:53:38 +12:00
parent 8c7fe6d8b8
commit 05dc715876
3 changed files with 3 additions and 3 deletions

View file

@ -54,12 +54,12 @@ pub async fn cli() -> Result<(), Box<dyn Error>> {
command("from-json", from_json::from_json),
command("from-toml", from_toml::from_toml),
command("from-yaml", from_yaml::from_yaml),
command("get", get::get),
command("open", open::open),
command("pick", pick::pick),
command("split-column", split_column::split_column),
command("split-row", split_row::split_row),
command("reject", reject::reject),
command("select", select::select),
command("trim", trim::trim),
command("to-array", to_array::to_array),
command("to-json", to_json::to_json),

View file

@ -7,12 +7,12 @@ crate mod first;
crate mod from_json;
crate mod from_toml;
crate mod from_yaml;
crate mod get;
crate mod ls;
crate mod open;
crate mod pick;
crate mod ps;
crate mod reject;
crate mod select;
crate mod size;
crate mod skip;
crate mod sort_by;

View file

@ -19,7 +19,7 @@ fn get_member(path: &str, obj: &Value) -> Option<Value> {
Some(current.copy())
}
pub fn select(args: CommandArgs) -> Result<OutputStream, ShellError> {
pub fn get(args: CommandArgs) -> Result<OutputStream, ShellError> {
if args.positional.is_empty() {
return Err(ShellError::string("select requires a field"));
}