diff options
author | Joe Watkins <krakjoe@php.net> | 2016-11-20 05:24:14 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-11-20 05:26:46 +0000 |
commit | 893a27d6327e29f0af4f8de7dc4c9569dd4a3698 (patch) | |
tree | dc30e6c4f186184398d96f1a315d0c5d665b6241 /sapi/phpdbg/phpdbg_help.c | |
parent | 8113daef499d7d56cb9b5877b27c26667469615a (diff) | |
download | php-git-893a27d6327e29f0af4f8de7dc4c9569dd4a3698.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.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index 0943a7ea2c..eb62d76d2e 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; |