implemented for loops

This commit is contained in:
2025-04-20 05:16:50 -04:00
parent d741854f5f
commit 11353b2d69
27 changed files with 360 additions and 174 deletions

View File

@@ -5,12 +5,13 @@ use rustyline::{completion::Completer, highlight::Highlighter, hint::{Hint, Hint
use crate::{libsh::term::{Style, Styled}, parse::{lex::{LexFlags, LexStream}, ParseStream}};
use crate::prelude::*;
#[derive(Default,Debug)]
pub struct FernReadline {
}
impl FernReadline {
pub fn new() -> Self {
Self { }
Self::default()
}
}
@@ -50,7 +51,7 @@ impl Hinter for FernReadline {
fn hint(&self, line: &str, pos: usize, ctx: &rustyline::Context<'_>) -> Option<Self::Hint> {
let ent = ctx.history().search(
line,
ctx.history().len() - 1,
ctx.history().len().saturating_sub(1),
rustyline::history::SearchDirection::Reverse
).ok()??;
let entry_raw = ent.entry.get(pos..)?.to_string();