From 42a260f1e6f8c16aefb4786099916b6799aa4bda Mon Sep 17 00:00:00 2001 From: axel Date: Sat, 27 May 2006 21:14:56 +1000 Subject: Use ahead of time validator to make sure that commands entered on the command line are valid darcs-hash:20060527111456-ac50b-1bc070467029b851d34a1b99457415e3f0b24429.gz --- reader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'reader.c') diff --git a/reader.c b/reader.c index dd59a87d..3dc67b73 100644 --- a/reader.c +++ b/reader.c @@ -2099,7 +2099,13 @@ void reader_run_command( wchar_t *cmd ) static int shell_test( wchar_t *b ) { - return !wcslen(b); + if( parser_test( b, 0 ) ) + { + writech( L'\n' ); + parser_test( b, 1 ); + return 1; + } + return 0; } /** -- cgit v1.2.3