|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79648 Control + Arrows not working in Interactive PHP `php -a`
Submitted: 2020-05-28 16:21 UTC Modified: 2020-05-28 17:11 UTC
From: d28b312d at opayq dot com Assigned:
Status: Open Package: Readline related
PHP Version: Irrelevant OS: Windows 10 + Cygwin
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
2 + 34 = ?
Subscribe to this entry?

 [2020-05-28 16:21 UTC] d28b312d at opayq dot com
The Cygwin PHP version is compiled with `libedit` which in itself isn't bad but it seems on Cygwin it's outputting symbols such as `;5C` and `;5D` instead of moving the cursor.

I have a valid inputrc file (used by bash for readline) and that works fine so for bash this is all working.

I tried creating an editrc file `~/.editrc` and it seems PHP doesn't load this, nor does it obey the `EDITRC` env var either.
bind "\e[1;5D" vi-prev-word
bind "\e[1;5C" vi-next-word

My `TERM` Is 'xterm-256color' and this happens on any terminal (mintty or cmd).

Expected result:
Control + Arrows to work

Actual result:
/c/src/somesource (master) [0] $ php -a
Interactive shell

php > ;5D;5C;5D;5C


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-28 17:11 UTC]
> The Cygwin PHP version is compiled with `libedit` […]

Why?  Did you ask the maintainers?
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 25 08:01:23 2021 UTC