attempt to reconstruct search term
This commit is contained in:
@@ -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])) {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user