X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=interactive.c;h=288e9f3031f2890f73282a67ebd04be5bdffe142;hb=0643775c40e8726d75b2a556fd8459964169f04a;hp=4e4ccc7417d0165581725c298ceb4bf6a06d1d30;hpb=f101e2eebec54c87f2675a8e2a57f3418a824b9b;p=adu.git diff --git a/interactive.c b/interactive.c index 4e4ccc7..288e9f3 100644 --- a/interactive.c +++ b/interactive.c @@ -65,7 +65,9 @@ static int icom_help(__a_unused char *line) void print_interactive_help(void) { - icom_help(NULL); + struct interactive_command *c; + FOR_EACH_COMMAND(c) + fprintf(stdout, "\t%s\t%s\n", c->name, c->desc); } static int icom_reset(__a_unused char *line) @@ -121,6 +123,8 @@ static int exec_interactive_command(char *line) if (!*line) return 1; /* OK, we have a non-empty line */ + if (*line == '#') + return 1; cmd = adu_strdup(line); args = cmd + strcspn(cmd, delim); if (!*args)