From 4e344aecdbb05e95672b96cb06367aff3c5b41e8 Mon Sep 17 00:00:00 2001 From: Peter Soetens Date: Sun, 19 Jun 2011 00:15:00 +0200 Subject: [PATCH] lua: print quit information when running interactive Signed-off-by: Peter Soetens --- lua/lua-repl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lua/lua-repl.c b/lua/lua-repl.c index 15a4c80..7db925c 100644 --- a/lua/lua-repl.c +++ b/lua/lua-repl.c @@ -117,6 +117,9 @@ static void print_version (void) { l_message(NULL, RTTLUA_BOILER " " RTTLUA_VERSION " / " LUA_RELEASE " (" XSTR(OROCOS_TARGET) ")" ); } +static void print_quit_info (void) { + l_message(NULL, " Use Ctrl-D to quit." ); +} static int getargs (lua_State *L, char **argv, int n) { int narg; @@ -369,6 +372,7 @@ static int pmain (lua_State *L) { else if (script == 0 && !has_e && !has_v) { if (lua_stdin_is_tty()) { print_version(); + print_quit_info(); dotty(L); } else dofile(L, NULL); /* executes stdin as a file */ -- 1.7.1