diff --git a/tools/cli/src/mentat_cli/command_parser.rs b/tools/cli/src/mentat_cli/command_parser.rs index 7f1eb0ae..aa81e4d7 100644 --- a/tools/cli/src/mentat_cli/command_parser.rs +++ b/tools/cli/src/mentat_cli/command_parser.rs @@ -72,10 +72,10 @@ impl Command { pub fn output(&self) -> String { match self { &Command::Query(ref args) => { - format!(".{} {}", QUERY_COMMAND, args) + format!(".{} {}", LONG_QUERY_COMMAND, args) }, &Command::Transact(ref args) => { - format!(".{} {}", TRANSACT_COMMAND, args) + format!(".{} {}", LONG_TRANSACT_COMMAND, args) }, &Command::Help(ref args) => { format!(".{} {:?}", HELP_COMMAND, args) @@ -135,13 +135,13 @@ pub fn command(s: &str) -> Result { let query_parser = try(string(LONG_QUERY_COMMAND)).or(try(string(SHORT_QUERY_COMMAND))) .with(edn_arg_parser()) .map(|x| { - Ok(Command::Query(x.into_iter().collect())) + Ok(Command::Query(x)) }); let transact_parser = try(string(LONG_TRANSACT_COMMAND)).or(try(string(SHORT_TRANSACT_COMMAND))) .with(edn_arg_parser()) .map( |x| { - Ok(Command::Transact(x.into_iter().collect())) + Ok(Command::Transact(x)) }); spaces() diff --git a/tools/cli/src/mentat_cli/repl.rs b/tools/cli/src/mentat_cli/repl.rs index fd6b3376..9f84060c 100644 --- a/tools/cli/src/mentat_cli/repl.rs +++ b/tools/cli/src/mentat_cli/repl.rs @@ -17,10 +17,10 @@ use command_parser::{ Command, HELP_COMMAND, OPEN_COMMAND, - QUERY_COMMAND, - ALT_QUERY_COMMAND, - TRANSACT_COMMAND, - ALT_TRANSACT_COMMAND, + LONG_QUERY_COMMAND, + SHORT_QUERY_COMMAND, + LONG_TRANSACT_COMMAND, + SHORT_TRANSACT_COMMAND, }; use input::InputReader; use input::InputResult::{ @@ -39,10 +39,10 @@ lazy_static! { let mut map = HashMap::new(); map.insert(HELP_COMMAND, "Show help for commands."); map.insert(OPEN_COMMAND, "Open a database at path."); - map.insert(QUERY_COMMAND, "Execute a query against the current open database."); - map.insert(ALT_QUERY_COMMAND, "Shortcut for `.query`. Execute a query against the current open database."); - map.insert(TRANSACT_COMMAND, "Execute a transact against the current open database."); - map.insert(ALT_TRANSACT_COMMAND, "Shortcut for `.transact`. Execute a transact against the current open database."); + map.insert(LONG_QUERY_COMMAND, "Execute a query against the current open database."); + map.insert(SHORT_QUERY_COMMAND, "Shortcut for `.query`. Execute a query against the current open database."); + map.insert(LONG_TRANSACT_COMMAND, "Execute a transact against the current open database."); + map.insert(SHORT_TRANSACT_COMMAND, "Shortcut for `.transact`. Execute a transact against the current open database."); map }; }