From 88a95efdfab841f06ddc1582db9736e3299acf75 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Fri, 22 Nov 2013 19:50:13 +0000 Subject: [PATCH] compress help menu --- phpdbg_help.c | 23 +++++++++++++++++++++++ phpdbg_help.h | 2 ++ phpdbg_prompt.c | 18 ------------------ 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/phpdbg_help.c b/phpdbg_help.c index c82a48497d..50b77b3b7d 100644 --- a/phpdbg_help.c +++ b/phpdbg_help.c @@ -467,3 +467,26 @@ PHPDBG_HELP(shell) /* {{{ */ phpdbg_help_footer(); return SUCCESS; } /* }}} */ + +PHPDBG_HELP(options) /* {{{ */ +{ + phpdbg_help_header(); + phpdbg_writeln("Below are the command line options supported by phpdbg"); + phpdbg_notice("Command Line Options and Flags"); + phpdbg_writeln(" -c\t-c/my/php.ini\t\tSet php.ini file to load"); + phpdbg_writeln(" -d\t-dmemory_limit=4G\tSet a php.ini directive"); + phpdbg_writeln(" -n\tN/A\t\t\tDisable default php.ini"); + phpdbg_writeln(" -q\tN/A\t\t\tSupress welcome banner"); + phpdbg_writeln(" -e\t-emytest.php\t\tSet execution context"); + phpdbg_writeln(" -v\tN/A\t\t\tEnable oplog output"); + phpdbg_writeln(" -s\tN/A\t\t\tEnable stepping"); + phpdbg_writeln(" -b\tN/A\t\t\tDisable colour"); + phpdbg_writeln(" -i\t-imy.init\t\tSet .phpdbginit file"); + phpdbg_writeln(" -I\tN/A\t\t\tIgnore default .phpdbginit"); + phpdbg_writeln(" -O\t-Omy.oplog\t\tSets oplog output file"); + phpdbg_writeln(" -r\tN/A\t\t\tRun execution context"); + phpdbg_writeln(" -E\tN/A\t\t\tEnable step through eval, careful !"); + phpdbg_notice("Passing -rr will quit automatically after execution"); + phpdbg_help_footer(); + return SUCCESS; +} /* }}} */ diff --git a/phpdbg_help.h b/phpdbg_help.h index c453c506bf..8ec9ee235f 100644 --- a/phpdbg_help.h +++ b/phpdbg_help.h @@ -49,6 +49,7 @@ PHPDBG_HELP(quiet); PHPDBG_HELP(list); PHPDBG_HELP(oplog); PHPDBG_HELP(register); +PHPDBG_HELP(options); PHPDBG_HELP(shell); /** @@ -75,6 +76,7 @@ static const phpdbg_command_t phpdbg_help_commands[] = { PHPDBG_COMMAND_D_EX(list, "list code gives you quick access to code", 'l', help_list, NULL, 0), PHPDBG_COMMAND_D_EX(oplog, "keep clutter off the screen by logging oplines", 'O', help_oplog, NULL, 0), PHPDBG_COMMAND_D_EX(register, "register a function for use as a command", 'R', help_register,NULL, 0), + PHPDBG_COMMAND_D_EX(options, "show information about command line options", 'o', help_options, NULL, 0), PHPDBG_COMMAND_D_EX(shell, "execute system commands with direct shell access", '-', help_shell, NULL, 0), PHPDBG_END_COMMAND }; diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 6b20284a2e..98c79cf361 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -972,24 +972,6 @@ PHPDBG_COMMAND(help) /* {{{ */ ++help_command; } - phpdbg_notice("Command Line Options and Flags"); - phpdbg_writeln(" Option\tExample\t\t\tPurpose"); - phpdbg_writeln(EMPTY); - phpdbg_writeln(" -c\t-c/my/php.ini\t\tSet php.ini file to load"); - phpdbg_writeln(" -d\t-dmemory_limit=4G\tSet a php.ini directive"); - phpdbg_writeln(" -n\tN/A\t\t\tDisable default php.ini"); - phpdbg_writeln(" -q\tN/A\t\t\tSupress welcome banner"); - phpdbg_writeln(" -e\t-emytest.php\t\tSet execution context"); - phpdbg_writeln(" -v\tN/A\t\t\tEnable oplog output"); - phpdbg_writeln(" -s\tN/A\t\t\tEnable stepping"); - phpdbg_writeln(" -b\tN/A\t\t\tDisable colour"); - phpdbg_writeln(" -i\t-imy.init\t\tSet .phpdbginit file"); - phpdbg_writeln(" -I\tN/A\t\t\tIgnore default .phpdbginit"); - phpdbg_writeln(" -O\t-Omy.oplog\t\tSets oplog output file"); - phpdbg_writeln(" -r\tN/A\t\t\tRun execution context"); - phpdbg_writeln(" -E\tN/A\t\t\tEnable step through eval, careful !"); - phpdbg_notice( - "Note: passing -rr will cause phpdbg to quit after execution"); phpdbg_help_footer(); } break; -- 2.40.0