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/ksh.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/ksh.1')
-rw-r--r-- | bin/ksh/ksh.1 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1 index a25235e9e19..b0b6bd384b7 100644 --- a/bin/ksh/ksh.1 +++ b/bin/ksh/ksh.1 @@ -1,8 +1,8 @@ -.\" $OpenBSD: ksh.1,v 1.123 2009/01/29 23:27:26 jaredy Exp $ +.\" $OpenBSD: ksh.1,v 1.124 2009/02/07 07:24:37 guenther Exp $ .\" .\" Public Domain .\" -.Dd $Mdocdate: January 29 2009 $ +.Dd $Mdocdate: February 7 2009 $ .Dt KSH 1 .Os .Sh NAME @@ -2500,6 +2500,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; @@ -3030,6 +3040,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 |