Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] respect nullglob given multios
- X-seq: zsh-workers 44817
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Joe Rice <jsrice@xxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [PATCH] respect nullglob given multios
- Date: Fri, 11 Oct 2019 09:33:26 +0100 (BST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1570782806; bh=THwM4zjf0LiEmmdpme9PTGgJIXHCJALPgDK40xhABtU=; h=Date:From:To:In-Reply-To:References:Subject; b=CiEDhZGSiQAElfV9H1l0OxBYk4lbXn2yV+pTOywXaXf5cJFa4bqyniOlRHjuatuv+ z6JMV6JBs8R5vu8+wkUnx1tDq5smtSMibAomZ3W/jlF8pxB1N5fbinU5ui5jBpqOO7 8HWTzuQZmPDoEqHbmSmBAPwIT6zo3oN13yYpTtUA5eTWBTtTzAVUPtg/RrqPHbNd71 METnP2sIQLMNoBnhF16TxcgnQhqgaEfMSfntiH2iWimUHuvHEFaUheteMsHrZWA+gv z/BzCoorDBNqGLZ9VcPVeRlhintUebm6HlzF4xJUoPSAmx8QRkJtVHk/84PrkpTdMz gQx/FGRq6USGA==
- Importance: Medium
- In-reply-to: <lSzcSt2-L6melPjC4U9aH-gwyQ9YwbsQKX-WtKyiWOtyYp5bK0ijIluIyrFR3_7SlEEtbZUFT65D77k4OJjDUCdJfqipkmM9xcNyup3xtpw=@protonmail.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: <CGME20191010011901epcas4p3219be0dd0e02bc7168787305e4e1dcf6@epcas4p3.samsung.com> <eHuJUUFGjWrs2advn-wr-KY1I_DaHcKtYuWVNwErBRoooCtpjSfpKnHl7b-02chqYlfSOj-uJEHIBaNtFg0aabDfW8Lv46w-UFoQnQ1q-c0=@protonmail.com> <1570725646.5885.4.camel@samsung.com> <8915ded7b3350db47105804659b99b2c3e07cf45.camel@fifi.org> <lSzcSt2-L6melPjC4U9aH-gwyQ9YwbsQKX-WtKyiWOtyYp5bK0ijIluIyrFR3_7SlEEtbZUFT65D77k4OJjDUCdJfqipkmM9xcNyup3xtpw=@protonmail.com>
> On 11 October 2019 at 07:46 Joe Rice <jsrice@xxxxxxxxxxxxxx> wrote:
> > On Thu, 2019-10-10 at 16:40 +0000, Peter Stephenson wrote:
> > > On Thu, 2019-10-10 at 01:18 +0000, Joe Rice wrote:
> > >
> > > > This patch makes multios behave less surprisingly with nullglob.
> > > > Currently, multios throws a file not found error when a nullglob is
> > > > given. This patch inserts /dev/null into the redirection list when
> > > > the
> > > > glob returns empty with no errors.
> > > > Is this a behavior that would interest anyone else? I find myself
> > > > using the `cat /dev/null *(N.)` idiom quite a bit and I thought the
> > > > behavior made sense for the null case in multios.
> > >
> > > This does seem a logical effect, though it ought to be documented.
> >
> > I am not sure if it's that logical.
> > What about if the pipeline on left of the redirection is something
> > expensive?
> > I'd rather have the command fail than starting a long-running job whose
> > output will be lost.
>
> For the case of expensive pipelines on the left side, running with a global nullglob
> and expecting it to never be null already seems like a risky proposition, and if they
> were using an explicit qualifier, then I think they would have sufficiently acknowledged
> that behavior.
I tend to agree with your analysis here. Philippe's argument seems to boil down to that
nullglob should somehow behave like not having nullglob in case you don't want nullglob
behaviour? But maybe others have views.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author