]> granicus.if.org Git - php/commitdiff
add readline completion tip to phpdbginit
authorkrakjoe <joe.watkins@live.co.uk>
Fri, 22 Nov 2013 10:39:21 +0000 (10:39 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Fri, 22 Nov 2013 10:39:21 +0000 (10:39 +0000)
.phpdbginit

index 10c831b0329daca65bf11f343fdcbbb1f6ea9a08..463a2c46e0d81b355b86aa24ec9fdcbedaf3fef6 100644 (file)
@@ -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 ...