Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG]builtin echo error doing arguments parsing

On Sat, 24 Feb 2018 09:51:51 +0000
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> Perhaps the difference could be flagged up better in the do.

(or "doc" as we say, if we're not sending replies from our mobile

I'm sure somebody can object to aspects of the following.


diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 6c7ec4b..9014c78 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -504,6 +504,15 @@ pindex(BSD_ECHO, use of)
 The tt(-E) flag, or the tt(BSD_ECHO) option, can be used to disable
 these escape sequences.  In the latter case, tt(-e) flag can be used to
 enable them.
+Note that for standards compliance a double dash does not terminate
+option processing; instead, it is printed directly.  However, a
+single dash does terminate option processing, so the first dash,
+possibly following options, is not printed, but everything following it
+is printed as an argument.  The single dash behaviour is different
+from other shells.  For a more portable way of printing text, see
+tt(printf), and for a more controllable way of printing text within zsh,
+see tt(print).

Messages sorted by: Reverse Date, Date, Thread, Author