Req #67496 [NEW]: Save command history when exiting interactive shell with control-c
| From: | ryan dot brothers at gmail dot com | Date: | Mon, 23 Jun 2014 02:08:19 +0000 |
| Subject: | Req #67496 [NEW]: Save command history when exiting interactive shell with control-c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186293@lists.php.net to get a copy of this message | ||
From: ryan dot brothers at gmail dot com
Operating system: Linux
PHP version: 5.5.13
Package: *General Issues
Bug Type: Feature/Change Request
Bug description:Save command history when exiting interactive shell with control-c
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 bug report at https://bugs.php.net/bug.php?id=67496&edit=1
--