php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: d28b312d at opayq dot com
New email:
PHP Version: OS:

 

 [2020-05-28 16:21 UTC] d28b312d at opayq dot com
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Why?  Did you ask the maintainers?
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 22:01:23 2020 UTC