do not propagate nils from completion_proc
Fix issue #656 The default completion_proc will generate an array which might contain nils, and Coolline is not able to handle them gracefully.
This commit is contained in:
parent
704cc6e859
commit
e7eecfa8ea
|
@ -599,7 +599,8 @@ class Pry
|
|||
|
||||
if defined? Coolline and input.is_a? Coolline
|
||||
input.completion_proc = proc do |cool|
|
||||
completion_proc.call cool.completed_word
|
||||
completions = completion_proc.call cool.completed_word
|
||||
completions.compact
|
||||
end
|
||||
elsif input.respond_to? :completion_proc=
|
||||
input.completion_proc = completion_proc
|
||||
|
|
Loading…
Reference in New Issue