Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Documentation about Multios is misleading, and perhaps untrue
- X-seq: zsh-workers 43691
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Documentation about Multios is misleading, and perhaps untrue
- Date: Tue, 16 Oct 2018 02:07:35 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:subject :references:date; s=fm1; bh=NQFD7Nw5e7/NsMFfEgzbEYZt+hvivQmX50Gk DLCi1gY=; b=fifP+75vUA1iO4ybINSDcMOleNV1LhcTYFa2stsixU+565rmjhCd I/wqHsLYsWrsp/tZdn6zhIeoW+Imj5fFwDf8tcUJHs9zDMJ9LiO87HMuh7mOtgkE Q3NR/wTIGEbirpKuFHYE6lo0hQrMKwBoZHW9nThpp0SlHZJHBD2xmazz8XcDwyxX Ry2TJBUyYQNw7SUWpnc+KqB4x0KdViTYz/IRO3f9fBBCgCa4siURx0/z7cyYzlM7 iPWveqFVe7WSDJJNzjAiB7EGv/tyOQB1JWEGY2qX8kbOfbwRoFuayFQYATKb0yUV M91W8dkvCK7Cxp6upcUCKUc/yCv5Vu76Rg==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=NQFD7Nw5e7/NsMFfEgzbEYZt+hvivQmX50GkDLCi1 gY=; b=ytfKDChlAABKdILlowwt2W60Vtrx6llfHXnBX+Tw8s9VW5UqMMkZ1xCtL YT/IPdlyS7sKGuIOqYPmyIkZ3rVEm90vMq24VGrfJ8nLrLAM9fqzJNipngBzxAZi it8226ZkBas8xvKErdrPRbtT02znxgZDxYEOObB6rWul1e52s0Q0LCWlL5PFTPFW JmRt+gAKrrJISv4uBmkUTDPJ5YLkPYSsJv7ebvMAUemBFf6qnbtTUiYwa3MLEmnF i9gSYNBvjJIECuWp46O3jqz5tKRLJa8P6y1D9F26pZsDjYKkUknn2WtvERwAsgFC 1XS859sWYnOyddNkCdJMOBjn0mW9w==
- In-reply-to: <CAO1rNLgq0pRCkE7FcNgRSq-dT0UU2BspyUtcxwUMHf_wRJuebg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAO1rNLg3Y=W8=r6FSOyBLfjcvKmduit6UQGYwrDGKvVEHwOQJg@mail.gmail.com> <8B27B616-9DDE-4A04-AA05-2EA7234051A0@dana.is> <CAH+w=7ZMCr9qDUM9MBXKf4C8nu=HV4TTVOQdsB-gb=oJGDVB4g@mail.gmail.com> <1539290119.4188692.1539037288.272C51E2@webmail.messagingengine.com> <CGME20181011210006epcas4p459f3f70e15e1a0c0ac11a64967651f3c@epcas4p4.samsung.com> <CAH+w=7YPKmroUfvV1=NGn5rNL7Jufr6Oc_W_kNhuDFGa-CXB=w@mail.gmail.com> <20181012083056eucas1p1254a57c82328a4e9349c3a6f8997a0e6~cz0JMnlc50925009250eucas1p10@eucas1p1.samsung.com> <CAO1rNLgq0pRCkE7FcNgRSq-dT0UU2BspyUtcxwUMHf_wRJuebg@mail.gmail.com>
Tom Boyd wrote on Mon, 15 Oct 2018 20:45 -0400:
> 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.
It's really not zsh's job to document cat(1).
However, I agree with your overall point, that the statement about
"equivalence" in the manual is incorrect. At the same time, I think a
different fix would be better:
1. Ensure that it's documented that all redirections (input and output)
are opened before the command is even exec'd. This is true for all
redirections, not just for MULTIOS syntaxes.
2. In the section that gives analogies to cat(1) and sort(1), simply
state that the examples assume that all dirent names are ordinary,
readable files.
Makes sense? Anybody volunteering to write the patch (not me)?
> 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.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author