diff --git a/src/libCom/iocsh/iocsh.cpp b/src/libCom/iocsh/iocsh.cpp index a3cbd22a1..46f8d3529 100644 --- a/src/libCom/iocsh/iocsh.cpp +++ b/src/libCom/iocsh/iocsh.cpp @@ -567,6 +567,12 @@ iocshBody (const char *pathname, const char *commandLine) if ((prompt == NULL) && *line && (commandLine == NULL)) puts(line); + /* + * Ignore lines that become comment lines after macro expansion + */ + if (*line == '#') + continue; + /* * Break line into words */