From 0b125b6b5365220fa54a598bb3e2dac1e9371f0b Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 15 Feb 2022 11:15:16 +0100 Subject: [PATCH] [repl] completion based on dictionary's words and vars --- rpl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpl.rb b/rpl.rb index abaf8e8..d77b5ca 100755 --- a/rpl.rb +++ b/rpl.rb @@ -53,7 +53,7 @@ class RplRepl def run Readline.completion_proc = proc do |s| - Readline::HISTORY.grep(/^#{Regexp.escape(s)}/) + (@interpreter.dictionary.words.keys + @interpreter.dictionary.vars.keys).grep(/^#{Regexp.escape(s)}/) end Readline.completion_append_character = ' '