Add Candidate type for case-insensitive completion, shopt_group macro, escape fixes, and vi mode tweaks

This commit is contained in:
2026-03-17 01:25:55 -04:00
parent bce6cd10f7
commit b0325b6bbb
8 changed files with 477 additions and 598 deletions

View File

@@ -31,7 +31,7 @@ use crate::{
},
prelude::*,
readline::{
complete::{BashCompSpec, CompSpec},
complete::{BashCompSpec, Candidate, CompSpec},
keys::KeyEvent,
markers,
},
@@ -1001,6 +1001,13 @@ impl From<Vec<String>> for Var {
}
}
impl From<Vec<Candidate>> for Var {
fn from(value: Vec<Candidate>) -> Self {
let as_strs = value.into_iter().map(|c| c.0).collect::<Vec<_>>();
Self::new(VarKind::Arr(as_strs.into()), VarFlags::NONE)
}
}
impl From<&[String]> for Var {
fn from(value: &[String]) -> Self {
let mut new = VecDeque::new();