attempt to reconstruct search term

This commit is contained in:
Henrik Friedrichsen
2019-03-10 21:27:25 +01:00
parent fcf28183bc
commit fa56b03133
2 changed files with 1 additions and 2 deletions

View File

@@ -37,7 +37,6 @@ impl CommandManager {
} }
pub fn handle(&self, s: &mut Cursive, cmd: String) -> Result<Option<String>, String> { pub fn handle(&self, s: &mut Cursive, cmd: String) -> Result<Option<String>, String> {
// TODO: handle quoted arguments
let components: Vec<String> = cmd.split(' ').map(|s| s.to_string()).collect(); let components: Vec<String> = cmd.split(' ').map(|s| s.to_string()).collect();
if let Some(cb) = self.commands.get(&self.handle_aliases(&components[0])) { if let Some(cb) = self.commands.get(&self.handle_aliases(&components[0])) {

View File

@@ -227,7 +227,7 @@ fn main() {
}); });
if args.len() >= 1 { if args.len() >= 1 {
s.call_on_id("search_edit", |v: &mut EditView| { s.call_on_id("search_edit", |v: &mut EditView| {
v.set_content(args[0].clone()); v.set_content(args.join(" "));
}); });
} }
Ok(None) Ok(None)