From a608313602578f57e2832aa63c49f0f74d0dd5e6 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Thu, 13 Mar 2008 09:39:02 +0100 Subject: [PATCH] Use option -- separator in NON-POSIX form of echo utility * src/echo.c (main): add -- option separator to non-posix form of echo * NEWS : mention that change Signed-off-by: Ondřej Vašík --- NEWS | 2 ++ src/echo.c | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 809e0bb..f2fccfb 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,8 @@ GNU coreutils NEWS -*- outline -*- ** Improvements + echo (NON-POSIX part) now accepts -- options separator. + id and groups work around an AFS-related bug whereby those programs would print an invalid group number, when given no user-name argument. diff --git a/src/echo.c b/src/echo.c index f4e91f7..cc86874 100644 --- a/src/echo.c +++ b/src/echo.c @@ -163,6 +163,11 @@ main (int argc, char **argv) { case 'e': case 'E': case 'n': break; + case '-': + /* -- end of short options(allows to print -n,-e or -E + without POSIXLY_CORRECT env.variable) */ + argc--; + argv++; default: goto just_echo; } -- 1.5.2.2