about summary refs log tree commit diff
path: root/Doc/Zsh/redirect.yo
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2018-10-17 17:05:31 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2018-10-17 17:05:31 +0100
commit079f7f9d48644bfa2b14da69d519b558c5776797 (patch)
tree2197a18d53f2e0107c862d5ad587231091d723d9 /Doc/Zsh/redirect.yo
parentef584910922b1c46781d397165c17473e94dbbe0 (diff)
downloadzsh-079f7f9d48644bfa2b14da69d519b558c5776797.tar.gz
zsh-079f7f9d48644bfa2b14da69d519b558c5776797.tar.xz
zsh-079f7f9d48644bfa2b14da69d519b558c5776797.zip
43694: More detail on multios.
Mention how opening files in multios differs from cat.
Diffstat (limited to 'Doc/Zsh/redirect.yo')
-rw-r--r--Doc/Zsh/redirect.yo13
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/Zsh/redirect.yo b/Doc/Zsh/redirect.yo
index 833241574..7e38cd0c3 100644
--- a/Doc/Zsh/redirect.yo
+++ b/Doc/Zsh/redirect.yo
@@ -235,6 +235,9 @@ example(date >foo | cat)
 
 writes the date to the file `tt(foo)', and also pipes it to cat.
 
+Note that the shell opens all the files to be used in the multio process
+immediately, not at the point they are about to be written.
+
 Note also that redirections are always expanded in order.  This happens
 regardless of the setting of the tt(MULTIOS) option, but with the option
 in effect there are additional consequences. For example,
@@ -269,9 +272,13 @@ example(echo exit 0 >> *.sh)
 
 If the user tries to open a file descriptor for reading more than once,
 the shell opens the file descriptor as a pipe to a process that copies
-all the specified inputs to its output in the order
-specified, similar to bf(cat),
-provided the tt(MULTIOS) option is set.  Thus
+all the specified inputs to its output in the order specified, provided
+the tt(MULTIOS) option is set.  It should be noted that each file is
+opened immediately, not at the point where it is about to be read:
+this behaviour differs from tt(cat), so if strictly standard behaviour
+is needed, tt(cat) should be used instead.
+
+Thus
 
 example(sort <foo <fubar)