diff --git a/src/lib/shell/binary/readln.rs b/src/lib/shell/binary/readln.rs index c5d4881fb7e20401a95e54ec4a3421cde89ce0be..e46e70182695e7629875a72677562aba452f0276 100644 --- a/src/lib/shell/binary/readln.rs +++ b/src/lib/shell/binary/readln.rs @@ -74,7 +74,7 @@ pub(crate) fn readln(shell: &mut Shell) -> Option<String> { // Add the list of available variables to the completer's definitions. // TODO: We should make it free to do String->SmallString // and mostly free to go back (free if allocated) - .chain(vars.get_vars().map(|s| ["$", &s].concat().into())) + .chain(vars.strings().map(|s| ["$", &s].concat().into())) .collect(); // Initialize a new completer from the definitions collected. diff --git a/src/lib/shell/variables/mod.rs b/src/lib/shell/variables/mod.rs index 2f0e27d4540c6c45078bdfd1cb8b291e0894f283..4133a31601174c5c16f7c9b16192e4affa7dccb8 100644 --- a/src/lib/shell/variables/mod.rs +++ b/src/lib/shell/variables/mod.rs @@ -182,7 +182,7 @@ impl Variables { c.is_alphanumeric() || c == '_' || c == '?' } - pub fn get_vars<'a>(&'a self) -> impl Iterator<Item = Identifier> + 'a { + pub fn strings<'a>(&'a self) -> impl Iterator<Item = Identifier> + 'a { self.variables .keys() .cloned()