uC-Shell icon indicating copy to clipboard operation
uC-Shell copied to clipboard

Add command description support for the SHELL_CMD

Open vpetrigo opened this issue 5 years ago • 1 comments
trafficstars

Hello,

I would like to propose a change in the SHELL_CMD structure that allows a user to provide theirs own command description that may be used in the help command for example:

  • Proposed changes:
typedef struct shell_cmd {
    const CPU_CHAR *Name; ///< Ptr to cmd name.
    SHELL_CMD_FNCT Fnct;   ///< Ptr to cmd fnct.
    const CPU_CHAR *Descr; ///< Ptr to cmd description.
}
  • Outcome for the help command (implementation specific):
help: Print commands info
status: Print system status
reboot: Perform software reboot
bootloader: Switch into the bootloader application

vpetrigo avatar Oct 06 '20 13:10 vpetrigo

Thank you for the suggestion. We may decide to add this change at a later date. However, for the time being we recommend placing the text in the help command itself.

forg0ne avatar May 04 '21 20:05 forg0ne