[repl] completion based on dictionary's words and vars
This commit is contained in:
parent
fece818539
commit
0b125b6b53
1 changed files with 1 additions and 1 deletions
2
rpl.rb
2
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 = ' '
|
||||
|
||||
|
|
Loading…
Reference in a new issue