shell: printing command's help by shell engine

Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-11-26 16:43:27 +01:00 committed by Carles Cufí
commit e0be6a10b3
15 changed files with 41 additions and 346 deletions

View file

@ -342,7 +342,6 @@ struct shell_stats {
*/
struct shell_flags {
u32_t insert_mode :1; /*!< Controls insert mode for text introduction.*/
u32_t show_help :1; /*!< Shows help if -h or --help option present.*/
u32_t use_colors :1; /*!< Controls colored syntax.*/
u32_t echo :1; /*!< Controls shell echo.*/
u32_t processing :1; /*!< Shell is executing process function.*/
@ -615,18 +614,6 @@ void shell_fprintf(const struct shell *shell, enum shell_vt100_color color,
*/
void shell_process(const struct shell *shell);
/**
* @brief Informs that a command has been called with -h or --help option.
*
* @param[in] shell Pointer to the shell instance.
*
* @return True if help has been requested.
*/
static inline bool shell_help_requested(const struct shell *shell)
{
return shell->ctx->internal.flags.show_help;
}
/**
* @brief Prints the current command help.
*