]> Repositorios git - scryer-prolog.git/commitdiff
restore tab completion to REPL (#2575)
authorMark Thom <[email protected]>
Thu, 24 Apr 2025 01:55:50 +0000 (18:55 -0700)
committerMark Thom <[email protected]>
Tue, 8 Jul 2025 05:38:12 +0000 (22:38 -0700)
src/repl_helper.rs

index 26199c22173e09427b00deb93e1a973f2e6ccb66..afec4fd235135418f31fb5355f233c022722554d 100644 (file)
@@ -6,7 +6,7 @@ use rustyline::{Context, Helper as RlHelper, Result};
 
 use std::sync::Weak;
 
-use crate::atom_table::{AtomString, AtomTable}; //, STATIC_ATOMS_MAP};
+use crate::atom_table::{AtomString, AtomTable, STATIC_ATOMS_MAP};
 
 // TODO: Maybe add validation to the helper
 pub struct Helper {
@@ -74,7 +74,7 @@ impl Completer for Helper {
 
             let mut matching = index_set
                 .iter()
-                // .chain(STATIC_ATOMS_MAP.values())
+                .chain(STATIC_ATOMS_MAP.values())
                 .map(|a| a.as_str())
                 .filter(|a| a.starts_with(sub_str))
                 .collect::<Vec<_>>();