summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2018-02-26 19:58:01 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2018-02-26 19:58:01 +0000
commit557d1d7259229ee7dd762750f3bfbcd7412c8564 (patch)
treebcd9ea6476f22eaa04e204a62308c381e7602f3a
parent1142e2dedb628352bb6a45f58fed0fd29b0725a9 (diff)
downloadzsh-557d1d7259229ee7dd762750f3bfbcd7412c8564.tar.gz
zsh-557d1d7259229ee7dd762750f3bfbcd7412c8564.tar.xz
zsh-557d1d7259229ee7dd762750f3bfbcd7412c8564.zip
42399: document echo and behaviour of - and --
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/builtins.yo9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4fe0bf5d6..e543f861f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-26  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 42399: Doc/Zsh/builtins.yo: better description of interaction
+	between echo and dashes.
+
 2018-02-22  Daniel Hahler  <zsh@thequod.de>
 
 	* 42364: Completion/Unix/Command/_git: _git: fix __git_ignore_line to
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 6c7ec4b28..f460e48a5 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).
 )
 module(echotc)(zsh/termcap)
 module(echoti)(zsh/terminfo)