com php-src: add readline completion tip to phpdbginit: .phpdbginit
| From: | Bob Weinand | Date: | Fri, 22 Nov 2013 10:39:21 +0000 |
| Subject: | com php-src: add readline completion tip to phpdbginit: .phpdbginit | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74715@lists.php.net to get a copy of this message | ||
Commit: c51e7e26e9155bda8674b464ea4c419a0c89013f
Author: krakjoe <joe.watkins@live.co.uk> Fri, 22 Nov 2013 10:39:21 +0000
Parents: 46a67d15fe5d50d56c1372b0d2518cbe3e3cace3
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c51e7e26e9155bda8674b464ea4c419a0c89013f
Log:
add readline completion tip to phpdbginit
Changed paths:
M .phpdbginit
Diff:
diff --git a/.phpdbginit b/.phpdbginit
index 10c831b..463a2c4 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 ...