Edit report at https://bugs.php.net/bug.php?id=65191&edit=1
ID: 65191 Updated by: cataphr...@php.net Reported by: azhdanov at terricone dot com Summary: "Delete", "ctrl"+ arrows don't work in interactive interpreter -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Linux PHP Version: 5.4.16 Block user comment: N Private report: N New Comment: Not a PHP bug. Configure .editrc (for libedit) or .inputrc (for readline). For instance, I see that ubuntu compiles PHP against libedit, so for instance to have DEL to work you could edit your ~/.editrc and add: bind "\e[3~" ed-delete-next-char or just use default shortcuts here: http://www.bigsmoke.us/readline/shortcuts Those are valid for both libedit and readline. My guess is that irc, ipython etc. are compiled against readline and your distros provide a global /etc/inputrc where the bindings are defined. Previous Comments: ------------------------------------------------------------------------ [2013-07-03 08:33:02] azhdanov at terricone dot com Description: ------------ When running PHP interactive interpreter with: php -a "Delete" button doesn't work (produces `~` instead), jumping over words with "Ctrl"+"Left Arrow" and "Ctrl"+"Right Arrow" doesn't work either (`;5D` and `;5C`, respectively). It annoys me a lot - I use `php -a` every day. Worth noting, that other interpreters (irb, ipython, etc.) work good. The problem occurs in each distro I tried - (K)Ubuntu (PHP 5.4.9-4ubuntu2.1 (cli) (built: Jun 11 2013 13:10:01)), Fedora (PHP 5.3.3 (cli) (built: Nov 29 2012 04:12:23)), RHEL (PHP 5.3.3 (cli) (built: Nov 29 2012 04:12:23)). Works good on Mac though. Expected result: ---------------- Ctrl+arrows should move the cursor by words, delete should delete current character. Actual result: -------------- Ctrl+left arrow produces ;5D Ctrl+right arrow produces ;5C Delete produces ~ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65191&edit=1