diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-13 08:28:06 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-13 08:28:06 +0000 |
commit | 7930774b90e9fe211f85e7219e62feca198fe8d8 (patch) | |
tree | db0f209e52aa9b633a0bae690a7de69224693a65 | |
parent | e2e7e806fdccbc0f9823eecae08239e9ad10915a (diff) | |
download | mailutils-7930774b90e9fe211f85e7219e62feca198fe8d8.tar.gz mailutils-7930774b90e9fe211f85e7219e62feca198fe8d8.tar.bz2 |
(util_do_command): Interpret empty line as "next" command only when in
interactive mode.
-rw-r--r-- | mail/util.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/util.c b/mail/util.c index 2422e3ea9..1714eba3c 100644 --- a/mail/util.c +++ b/mail/util.c @@ -104,12 +104,17 @@ util_do_command (const char *c, ...) return 0; } - /* Hitting return i.e. no command, is equivalent to next - according to the POSIX spec. */ if (cmd[0] == '\0') { free (cmd); - cmd = strdup ("next"); + + /* Hitting return i.e. no command, is equivalent to next + according to the POSIX spec. Note, that this applies + to interactive state only. */ + if (interactive) + cmd = strdup ("next"); + else + return 0; } if (argcv_get (cmd, delim, NULL, &argc, &argv) == 0) |