Skip to content
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

Expose nqp::readlineintfh to perl6-land #261

Closed
wants to merge 4 commits into from
Closed

Expose nqp::readlineintfh to perl6-land #261

wants to merge 4 commits into from

Conversation

retupmoca
Copy link
Contributor

This gives perl6 code access to the readline library, since the REPL
already uses it.

This could also very easily be written as a module if we don't want this in CORE.setting

@retupmoca
Copy link
Contributor Author

Note that nqp::readlineintfh does not handle Term::ANSIColor gracefully. It calculates the cursor position by doing a strlen on the prompt, which will be incorrect when using color escape sequences.

If readlineintfh is implemented using readline, the escape sequences can be bracketed with "\x1" and "\x2" to keep them from being counted, but if implemented with linenoise no such workaround is possible.

This means, for example, the current Debugger::UI::CommandLine does not work well with this patch applied, as it uses colored prompts.

@retupmoca retupmoca closed this May 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant