From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27124 invoked by alias); 10 Nov 2016 08:15:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22108 Received: (qmail 871 invoked from network); 10 Nov 2016 08:15:32 -0000 X-Qmail-Scanner-Diagnostics: from aurora-borealis.phear.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(94.242.255.80):SA:0(-2.9/5.0):. Processed in 0.26765 secs); 10 Nov 2016 08:15:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: khatar@phear.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at phear.org designates 94.242.255.80 as permitted sender) X-Virus-Scanned: amavisd-new at phear.org Date: Thu, 10 Nov 2016 08:15:20 +0000 From: khatar@phear.org To: Zsh Users Subject: Re: would it be nice to support =<< ? (not the haskell one) Message-ID: <20161110081520.GA13495@aurora-borealis.phear.org> References: <20161109180219.GA28703@aurora-borealis.phear.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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