summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_help.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2016-11-20 05:24:14 +0000
committerJoe Watkins <krakjoe@php.net>2016-11-20 05:24:14 +0000
commit7753d104577dfec6a2b253365f539fbfda314e0f (patch)
tree06194313d98588ab0d878d0bc0c169e82ec2fb0e /sapi/phpdbg/phpdbg_help.c
parent48191010d518f6fdaedc50d53f3af8146a14c66d (diff)
downloadphp-git-7753d104577dfec6a2b253365f539fbfda314e0f.tar.gz
make it possible to show specific help pages without interactive session
Diffstat (limited to 'sapi/phpdbg/phpdbg_help.c')
-rw-r--r--sapi/phpdbg/phpdbg_help.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index ce1d8d9e90..2207e6a645 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -209,6 +209,26 @@ static int get_command(
} /* }}} */
+void phpdbg_do_help_cmd(char *type) { /* {{{ */
+ char *help;
+
+ if (!type) {
+ pretty_print(get_help("overview!"));
+ return;
+ }
+
+ help = get_help(type);
+
+ if (!help || memcmp(help, "", sizeof("")) == SUCCESS) {
+ pretty_print(get_help("overview!"));
+ pretty_print(
+ "\nrequested help page could not be found");
+ return;
+ }
+
+ pretty_print(help);
+} /* }}} */
+
PHPDBG_COMMAND(help) /* {{{ */
{
phpdbg_command_t const *cmd;