Update Reline core to stay in sync with the line_editor's completion_append_character
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start with the completion_append_character= implementation in lib/reline.rb at the linked lines, then reproduce the issue by changing the value inside a completion_proc. Verify how Reline.line_editor stores the value and confirm that the line editor reflects the new setting immediately, without requiring another readline or readmultiline context.
Written by the indexing model from the issue text.
Description
Description
When updating Reline.completion_append_character in Reline.completion_proc, the change does not get reflected until you enter a new Reline.readline or Reline.readmultiline context. It seems like the value of Reline.completion_append_character and Reline.line_editor.completion_append_character is out of sync.
Scenario: We are updating the value of Reline.completion_append_character = ' ' inside of the completion_proc, but it's not reflecting in the line_editor
Expected Behaviour
Being able to change Reline.completion_append_character in the completion proc and have it update the line_editor.
i.e. this code:
https://github.com/ruby/reline/blob/7534f7f92ad6ec5e38d7b404942cd7f30e3c1327/lib/reline.rb#L83-L93
To immediately update the line_editor's completion_append_character value
def completion_append_character=(val)
if val.nil?
@completion_append_character = nil
elsif val.size == 1
@completion_append_character = val.encode(encoding)
elsif val.size > 1
@completion_append_character = val[0].encode(encoding)
else
@completion_append_character = nil
end
# Ensure the line_editor is updated too:
line_editor.completion_append_character = @completion_append_character
end
Current Behaviour
Changing Reline.completion_append_character in Reline.completion_append_character does not take effect until a new call to Reline.readline.
Terminal Emulator
MacOS
Reline Version
0.5.10
- Dominant language
- Ruby
- Stars
- 311
- Forks
- 99
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/reline
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Arrow key inputs are ignored on ENABLE_VIRTUAL_TERMINAL_INPUT enabled windows consolePossibly taken @YO4 claimed this 68 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Reline emits extra escape sequences when stdin/stdout/stderr are not TTYPossibly taken @tompng claimed this 32 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yegor256/rubocop-elegant#92 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ecosyste-ms/awesome#812 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
forem/forem#23933 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rails/mission_control-jobs#347 ·
-
PROJECT: ILR/DRS
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thewca/worldcubeassociation.org#15914 ·
Maintainers usually reply within 1 day