|
@@ -93,12 +93,15 @@ shellmatta_retCode_t shellmatta_doInit(
|
|
|
inst->hereDelimiterIdx = 0u;
|
|
|
inst->hereLength = 0u;
|
|
|
inst->mode = SHELLMATTA_MODE_INSERT;
|
|
|
- inst->cmdList = &helpCmd;
|
|
|
+ inst->cmdList = &(inst->helpCmd);
|
|
|
inst->cmdListIsConst = false;
|
|
|
|
|
|
+ /*! -# copy the help command structure to this instance */
|
|
|
+ memcpy(&(inst->helpCmd), &helpCmd, sizeof(shellmatta_cmd_t));
|
|
|
+
|
|
|
if(NULL != cmdList)
|
|
|
{
|
|
|
- helpCmd.next = (shellmatta_cmd_t *) cmdList;
|
|
|
+ inst->helpCmd.next = (shellmatta_cmd_t *) cmdList;
|
|
|
inst->cmdListIsConst = true;
|
|
|
}
|
|
|
|