From cc1bf55b9996d556080c4104e211f24508b29cd8 Mon Sep 17 00:00:00 2001 From: Jonas Maier Date: Sat, 9 May 2026 17:25:28 +0200 Subject: can set custom prompt using the PROMPT variable --- src/parse/mod.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/parse/mod.rs') diff --git a/src/parse/mod.rs b/src/parse/mod.rs index c26e0c0..2c578cb 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -1,4 +1,4 @@ -use crate::{BString, bstr}; +use crate::{BString, bstr, PushAll}; #[cfg(test)] mod test; @@ -562,7 +562,7 @@ pub struct ExpString { } impl ExpString { - fn expand(self, e: &mut E) -> Res { + pub fn expand(self, e: &mut E) -> Res { let mut out = BString::new(); for part in self.parts.into_iter() { let mut x = match part { @@ -671,18 +671,6 @@ pub enum StringDelimiter { StrictCustom(BString), } -trait PushAll { - fn push_all(&mut self, other: &bstr); -} - -impl PushAll for BString { - fn push_all(&mut self, other: &bstr) { - for &c in other { - self.push(c); - } - } -} - /// gets the largest ident this slice starts with, might be empty fn peek_ident(b: &[u8]) -> &[u8] { if b.is_empty() || !b[0].is_ascii_alphabetic() { -- cgit v1.2.3