This allows for external code to see each command line before it is
processed and potentially skip it.
Signed-off-by: Keith Packard <keithp@keithp.com>
+#if HAS_CMD_FILTER
+/*
+ * Provided by an external module to filter raw command lines
+ */
+uint8_t
+ao_cmd_filter(void);
+#endif
+
lex_echo = 1;
for (;;) {
readline();
lex_echo = 1;
for (;;) {
readline();
+#if HAS_CMD_FILTER
+ if (ao_cmd_filter())
+ continue;
+ cmd_i = 0;
+#endif
ao_cmd_lex();
ao_cmd_white();
c = ao_cmd_lex_c;
ao_cmd_lex();
ao_cmd_white();
c = ao_cmd_lex_c;