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

Add support for editing current command line in external editor #392

Closed
hackel opened this issue Jun 27, 2017 · 4 comments
Closed

Add support for editing current command line in external editor #392

hackel opened this issue Jun 27, 2017 · 4 comments

Comments

@hackel
Copy link

hackel commented Jun 27, 2017

Often I find myself editing long, multi-line commands, and it would be really convenient to be able to just press a key and edit it in my editor (vim). Ideally this would work just like the edit-and-execute-command in bash (ctrl-x ctrl-e). Since psysh is already using readline (as is bash), hopefully it won't be difficult to port. http://git.savannah.gnu.org/cgit/bash.git/tree/bashline.c#n944

@bobthecow
Copy link
Owner

Unfortunately I don't think we have access to readline in that way… the PHP implementations of readline are almost an afterthought :(

@krageon
Copy link
Contributor

krageon commented Aug 30, 2017

I can look into adding the required functions as a patch to the php readline plugin.

@krageon
Copy link
Contributor

krageon commented Aug 30, 2017

The referenced PR adds editing external files inline using whatever EDITOR your environment has. If/when I see that the PHP maintainers are accepting of changes to the readline extension, I will see if I can get some hotkey support.

@bobthecow
Copy link
Owner

I'm going to close this for now. Feel free to reopen if/when PHP readline support is improved enough to do it with a hotkey :)

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

No branches or pull requests

3 participants