implemented autosuggestions for the line editor
This commit is contained in:
@@ -198,13 +198,14 @@ impl Dispatcher {
|
||||
self.io_stack.append_to_frame(func.redirs);
|
||||
|
||||
let func_name = argv.remove(0).span.as_str().to_string();
|
||||
let argv = prepare_argv(argv)?;
|
||||
if let Some(func) = read_logic(|l| l.get_func(&func_name)) {
|
||||
let snapshot = get_snapshots();
|
||||
// Set up the inner scope
|
||||
write_vars(|v| {
|
||||
**v = VarTab::new();
|
||||
v.clear_args();
|
||||
for arg in argv {
|
||||
for (arg,_) in argv {
|
||||
v.bpush_arg(arg.to_string());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -696,6 +696,8 @@ impl ParseStream {
|
||||
return Ok(None)
|
||||
}
|
||||
node_tks.push(self.next_tk().unwrap());
|
||||
|
||||
self.catch_separator(&mut node_tks);
|
||||
|
||||
|
||||
loop {
|
||||
@@ -707,6 +709,9 @@ impl ParseStream {
|
||||
node_tks.extend(node.tokens.clone());
|
||||
body.push(node);
|
||||
}
|
||||
dbg!(&self.tokens);
|
||||
panic!("{body:#?}");
|
||||
self.catch_separator(&mut node_tks);
|
||||
if !self.next_tk_is_some() {
|
||||
self.panic_mode(&mut node_tks);
|
||||
return Err(parse_err_full(
|
||||
|
||||
Reference in New Issue
Block a user