-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute compress_meta_key if convert_meta is on #389
Execute compress_meta_key if convert_meta is on #389
Conversation
fix `ruby#357` When using 8-bit characters, it is better not to use `compress_meta_key`. I believe not to use `compress_meta_key` unless `set convert-meta on` is written in the `.inputrc`. The following is a quote from tmtm's comments. > The behavior of this compress_meta_key method is similar to the behavior of convert-meta=on in readline, but readline turns off convert-meta if the locale contains 8bit characters. > In readline(3): > convert-meta (On) > If set to On, readline will convert characters with the eighth > bit set to an ASCII key sequence by stripping the eighth bit and > prefixing it with an escape character (in effect, using escape > as the meta prefix). The default is On, but readline will set > it to Off if the locale contains eight-bit characters. Co-authored-by: TOMITA Masahiro <tommy@tmtm.org>
After applying this branch, the document browsing function with Alt+D seems to stop working. 🤔 |
Added Alt+d keycode for not using convert_meta at ruby/irb#311. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert-meta (On)
(snip)
The default is On
Could you add the default value in initialize
method of Reline::Config
?
If Reline::IOGate.encoding contains 7-bit characters, convert-meta will set it On. Because in readline(3): > The default is On, but readline will set it to Off if the locale contains eight-bit characters. As far as I know, 7-bit encoding used in terminals is only US-ASCII.
Thank you! |
fix #357
When using 8-bit characters, it is better not to use
compress_meta_key
.I believe not to use
compress_meta_key
unlessset convert-meta on
is written in the.inputrc
.The following is a quote from tmtm's comments.
Co-authored-by: TOMITA Masahiro tommy@tmtm.org