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

Basic Readline Completion #127

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

NicolaF
Copy link

@NicolaF NicolaF commented Dec 19, 2016

How It works:

  • Prefix all data sent to EvalWorker with a 1 byte command identifier can be either CMD_EVAL ("\0") or CMD_COMPLETE ("\1").
  • completiion function sends CMD_COMPLETE . substr($info['line_buffer'], 0, $info['end']) to eval worker
  • eval worker sends back completions as a JSON blob.

Completion function inspired from https://github.com/erikdubbelboer/php-repl/blob/master/repl.php

Remove some dead code, keep eval worker alive if evaluation fails.

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