From 25fcad3768ab00ec0493c127efa4f3992706b2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Thu, 28 Jul 2011 01:06:47 +0200 Subject: [PATCH] cmd: Partial fix for echo's special ':' handling. --- programs/cmd/builtins.c | 4 ++-- programs/cmd/tests/test_builtins.cmd.exp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 86fd54ce347..49869ba7ae6 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -861,10 +861,10 @@ void WCMD_echo (const WCHAR *command) { int count; const WCHAR *origcommand = command; - if (command[0]==' ' || command[0]=='.') + if (command[0]==' ' || command[0]=='.' || command[0]==':') command++; count = strlenW(command); - if (count == 0 && origcommand[0]!='.') { + if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':') { if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW); else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW); return; diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 7db3b86a23f..e0d3cf77965 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -31,13 +31,13 @@ word .word @todo_wine@@pwd@>echo: -@todo_wine@ + @pwd@>echo :@space@ : @todo_wine@@pwd@>echo:word -@todo_wine@word +word @pwd@>echo :word@space@ :word @@ -57,9 +57,9 @@ at-echoed-word . word .word -@todo_wine@ + : -@todo_wine@word +word :word word@space@ word@space@@space@