You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The completion_append_character seems to be appended when there are still more autocomplete values available
This is my current code:
require'reline'COMPLETION_VALUES=['my_dir/http/linux/apache','my_dir/http/linux/ngnix','my_dir/windows/chrome','my_dir/linux/enum'].freezetab_complete_lambda=procdo |_str,_preposing=nil,_postposing=nil|
COMPLETION_VALUESendbeginprompt='Prompt > 'use_history=falsegetting_input=trueReline.completion_append_character=' 'Reline.completion_proc=tab_complete_lambdawhilegetting_inputtext=Reline.readmultiline(prompt,use_history)do |multiline_input|
# Accept the input until 'end' is enteredmultiline_input.split.last == 'end'endgetting_input=falseputs'You entered:'putstextend# If you want to exit, type Ctrl-CrescueInterruptputs'^C'end
Current Behaviour
Type in my_<TAB>
I receive my_dir/<SPACE>
The space is unexpected as I can still auto-complete more things.
Expected behaviour
Type in my_<TAB>
I receive my_dir/ (No space)
I can continue to tab the remaining completions my_dir/<tab> and receive my_dir/http/linux as a completion
The space is should not be appended - as there's still more values to be tab-completed, such as my_dir/http/linux etc
Potential fix
It looks like we might not want to append completion_append_character if there are still more items available in the completion_proc list:
Description
The
completion_append_character
seems to be appended when there are still more autocomplete values availableThis is my current code:
Current Behaviour
my_<TAB>
my_dir/<SPACE>
The space is unexpected as I can still auto-complete more things.
Expected behaviour
my_<TAB>
my_dir/
(No space)my_dir/<tab>
and receivemy_dir/http/linux
as a completionThe space is should not be appended - as there's still more values to be tab-completed, such as
my_dir/http/linux
etcPotential fix
It looks like we might not want to append
completion_append_character
if there are still more items available in thecompletion_proc
list:reline/lib/reline/line_editor.rb
Lines 880 to 884 in 7534f7f
Terminal Emulator
MacOS Terminal
Reline Version
0.5.10
The text was updated successfully, but these errors were encountered: