diff options
Diffstat (limited to 'cli/tools/repl.rs')
-rw-r--r-- | cli/tools/repl.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs index 73d1688e5..ce0879a85 100644 --- a/cli/tools/repl.rs +++ b/cli/tools/repl.rs @@ -115,8 +115,19 @@ impl Completer for Helper { .as_array() .unwrap() .iter() - .map(|r| r.get("name").unwrap().as_str().unwrap().to_string()) - .filter(|r| r.starts_with(&suffix[1..])) + .filter_map(|r| { + let name = r.get("name").unwrap().as_str().unwrap().to_string(); + + if name.starts_with("Symbol(") { + return None; + } + + if name.starts_with(&suffix[1..]) { + return Some(name); + } + + None + }) .collect(); return Ok((pos - (suffix.len() - 1), candidates)); |