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 22108
- From: khatar@xxxxxxxxx
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: would it be nice to support =<< ? (not the haskell one)
- Date: Thu, 10 Nov 2016 08:15:20 +0000
- In-reply-to: <CAH+w=7bU8SA92+VHwPwJBTaPX4a6JnJ3Y3iukPv+9h0ibj3e5Q@mail.gmail.com>
- 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> <CAH+w=7bU8SA92+VHwPwJBTaPX4a6JnJ3Y3iukPv+9h0ibj3e5Q@mail.gmail.com>
On Wed, Nov 09, 2016 at 11:27:41AM -0800, Bart Schaefer wrote:
> element=$(<<.
> { "user": "$USER", "uid": "$UID" }
> .
> )
>
> This is handled efficiently, with a minimum of forking.
i got it in my mind but i have to admit i always think twice before
using $() for a little amount of data (but i never benchmark anything)
in another hand, i realize i assumed that using read with an heredoc
doesn't need a fork. was i wrong ?
anyway: thanks for the idea!
> Note that it's necessary to follow the end marker with a newline before adding
> the closing paren.
nice to point it out! i wasted hours on things like that when i was a
newbie.
regards
marc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author