Req #67496 [Opn->Csd]: Save command history when exiting interactive shell with control-c

From: Date: Thu, 24 Jul 2014 16:03:11 +0000
Subject: Req #67496 [Opn->Csd]: Save command history when exiting interactive shell with control-c
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186802@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67496&edit=1 ID: 67496 Updated by: johannes@php.net Reported by: ryan dot brothers at gmail dot com Summary: Save command history when exiting interactive shell with control-c -Status: Open +Status: Closed Type: Feature/Change Request Package: *General Issues Operating System: Linux PHP Version: 5.5.13 Block user comment: N Private report: N New Comment: Automatic comment on behalf of saprykin.dmitry@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=d491b2f916d061666d9ff1cb5bdc484961b82db0 Log: Fix bug #67496 Save command history when exiting interactive shell with control-c Previous Comments: ------------------------------------------------------------------------ [2014-06-23 02:08:19] ryan dot brothers at gmail dot com Description: ------------ When using the PHP interactive shell (php -a), pressing Control-C to exit the shell does not write your last commands to ~/.php_history. Both the mysql and mongo console clients save your command history when you press Control-C to exit. Could the PHP interactive shell be updated to save your command history when Control-C is pressed to exit the shell? I use Control-C to exit various console clients, and often lose my last run commands in the PHP interactive shell since they are not saved when Control-C is used to exit the shell. Test script: --------------- 1) Run: php -a 2) Type: $a = 1; 3) Press: Control-C 4) Run: php -a 5) Press up. Expected result: ---------------- php > $a = 1; Actual result: -------------- php > $b = 2; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67496&edit=1

« previous php.bugs (#186802) next »