diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-02-07 07:24:38 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-02-07 07:24:38 +0000 |
commit | 91d7c4b1e8e19265e830892187ee5e1792850a00 (patch) | |
tree | d83e4318c83470f1dca183a54eda4df9ec899bde /bin/ksh/sh.1 | |
parent | cd505e09aae6eed8cd553387a9b220f845cc0c45 (diff) |
Make built-in echo behave according to POSIX when set -o posix is in effect:
the only option is -n, and only one of those is parsed.
diff from Ingo Schwarze
ok otto@ kili@; manpage changes ok jmc@
Diffstat (limited to 'bin/ksh/sh.1')
-rw-r--r-- | bin/ksh/sh.1 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1 index 95ab08d9d09..232cf13061e 100644 --- a/bin/ksh/sh.1 +++ b/bin/ksh/sh.1 @@ -1,8 +1,8 @@ -.\" $OpenBSD: sh.1,v 1.77 2009/01/29 23:27:26 jaredy Exp $ +.\" $OpenBSD: sh.1,v 1.78 2009/02/07 07:24:37 guenther Exp $ .\" .\" Public Domain .\" -.Dd $Mdocdate: January 29 2009 $ +.Dd $Mdocdate: February 7 2009 $ .Dt SH 1 .Os .Sh NAME @@ -1939,6 +1939,16 @@ In the future, a new option .Pq Fl v No perhaps will be added to distinguish the two behaviours. .It +.Ic echo +options. +In POSIX mode, +.Fl e +and +.Fl E +will not be treated as options, but printed like other arguments; +in non-POSIX mode, these options control the interpretation +of backslash sequences. +.It .Ic fg exit status. In POSIX mode, the exit status is 0 if no errors occur; @@ -2326,6 +2336,10 @@ option suppresses the trailing newline, enables backslash interpretation (a no-op, since this is normally done), and .Fl E suppresses backslash interpretation. +If the +.Ic posix +option is set, only the first argument is treated as an option, and only +if it is exactly ``-n''. .Pp .It Ic eval Ar command ... The arguments are concatenated (with spaces between them) to form a single |