From: krakjoe Date: Fri, 22 Nov 2013 10:39:21 +0000 (+0000) Subject: add readline completion tip to phpdbginit X-Git-Tag: php-5.6.0alpha1~110^2~143^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c51e7e26e9155bda8674b464ea4c419a0c89013f;p=php add readline completion tip to phpdbginit --- diff --git a/.phpdbginit b/.phpdbginit index 10c831b032..463a2c46e0 100644 --- a/.phpdbginit +++ b/.phpdbginit @@ -31,6 +31,18 @@ function my_debugging_function() /* phpdbg_break(PHPDBG_METHOD, "phpdbg::method"); */ /* phpdbg_break(PHPDBG_FUNC, "my_global_function"); */ /* phpdbg_break(PHPDBG_FILE, "/path/to/file.php:10"); */ + +/* + If readline is loaded, you might want to setup completion for your project: +*/ +if (function_exists('readline_completion_function')) { + readline_completion_function(function(){ + return array_merge( + get_defined_functions()['user'], + array_keys(get_defined_constants()) + ); + }); +} :> ########################################################## # Now carry on initializing phpdbg ...