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

Re: Documentation about Multios is misleading, and perhaps untrue



 I think this section should just breifly describe that the file
descriptors are opened before the command is executed, and that

command < file1 < file2

is *similar* to

cat file1 file2 | command

except that the first waits for all files to be opened *before* command
executes and completely fails if any file opening fails, where as cat x y z
| command immediately starts processing files and simply skips ones that
fail.

On a more general philosophical note though, I get that context is
important, but man pages and software references should **never** contain
objectively false statements. It's not ok to say something that factually
incorrect and justify it by assuming the reader will have enough "common
sense" to determine what parts are correct and which arent. These
references are the single souce of truth for a lot of readers.



On Fri, Oct 12, 2018 at 4:31 AM Peter Stephenson <p.stephenson@xxxxxxxxxxx>
wrote:

> I don't see why we shouldn't at least be a bit more careful...
>
> pws
>
> diff --git a/Doc/Zsh/redirect.yo b/Doc/Zsh/redirect.yo
> index c793638..fc52c77 100644
> --- a/Doc/Zsh/redirect.yo
> +++ b/Doc/Zsh/redirect.yo
> @@ -268,9 +268,10 @@ 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.  This is roughly similar to bf(cat) but
> +note that shell redirection syntax implies differences in detailed
> +behaviour.  Thus
>
>  example(sort <foo <fubar)
>
>
>

-- 
Thomas Boyd


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