Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: would it be nice to support =<< ? (not the haskell one)
- X-seq: zsh-users 22106
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: would it be nice to support =<< ? (not the haskell one)
- Date: Wed, 9 Nov 2016 11:27:41 -0800
- Cc: Marc Chantreux <khatar@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=O7LzQOlpCMxvk1uXG4U0WX1em4/quFDtqRLOZbJaFEY=; b=c+EEuC+OUMRjyhCscVXgGXA0NY3BysEqF2YgGTSmez9BFH/VnxyO/CG8ApQC7IATQT SD0IWPwGzsYxfJRo1O243+3CZt5gTS+9dRNpW8Gnm2Ng+J7odm+pPRRdWYmjAZxpiRNi cVNdSLKFZSntC7MWHqYG6FHXHvqUc6WsQKg3XhgombIpt4M7c9MIQpSbUspvXtCsMEBK fMWHz8pKsnGYJwMjEKvWAOG/ss69dVKcFhKEyr/w35WQC/pIEMA9PoD8HderS5gNe7MN 9CKnAi4zQ+RTXsApdQzIyD2rucvTw61+1ylQajNIkR6AbHFRDT76gIFEAUUqKxuGwhR4 XUWA==
- In-reply-to: <20161109180219.GA28703@aurora-borealis.phear.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20161109180219.GA28703@aurora-borealis.phear.org>
On Wed, Nov 9, 2016 at 10:02 AM, <khatar@xxxxxxxxx> wrote:
>
> i was thinking of a =<< operator so we could write
>
> element=<<.
> { "user": "$USER", "uid": "$UID" }
> .
You can do this:
element=$(<<.
{ "user": "$USER", "uid": "$UID" }
.
)
This is handled efficiently, with a minimum of forking. Note that
it's necessary to follow the end marker with a newline before adding
the closing paren.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author