Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reline ignores echoing suppression #207

Open
hurricup opened this issue Nov 17, 2020 · 1 comment
Open

Reline ignores echoing suppression #207

hurricup opened this issue Nov 17, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@hurricup
Copy link

If terminal echoing suppressed, reline seems sending echo anyway. Is it possible to avoid that?

E.g. with ENABLE_ECHO_INPUT 0x0004 unsetting. https://docs.microsoft.com/en-us/windows/console/setconsolemode
Readline honors this setting and does not sent echo.

I believe this happens somewhere here https://github.com/ruby/reline/blob/master/lib/reline/line_editor.rb#L530

(If i comment this out, everything works as expected, without echo)

@tompng
Copy link
Member

tompng commented Feb 4, 2024

We should support this use case. It used to work before ruby 3.3.

password = STDIN.noecho do
  Readline.readline 'Enter password: '
end

code search result

@ima1zumi ima1zumi added the enhancement New feature or request label Apr 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Development

No branches or pull requests

3 participants