From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6938 invoked from network); 16 Dec 2020 19:51:29 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2020 19:51:29 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by ewsd; Wed Dec 16 14:50:42 -0500 2020 Received: from abbatoir.fios-router.home (pool-74-101-2-6.nycmny.fios.verizon.net [74.101.2.6]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 9428fdcb (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO); Wed, 16 Dec 2020 11:50:33 -0800 (PST) Message-ID: <50C860013C58EB44D0C12761DBFD50EA@eigenstate.org> To: sirjofri+ml-9front@sirjofri.de To: 9front@9front.org Date: Wed, 16 Dec 2020 11:50:31 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: markup metadata Subject: Re: [9front] [PATCH] Update hpost to use -r header like hget Reply-To: 9front@9front.org Precedence: bulk Quoth sirjofri : > Hello, > > I don't know how exactly rc parses arguments when it invokes another > command, maybe try it with this concatenation? > > '-r '^$headers > > Notice the space and the quotes that make it effectively a string. > > sirjofri > won't work. rc doesn't re-expand arguments; it more or less only splits words when evaluating `{}, so '-r foo' ends up as one unit when you do the concatenation: cpu% h='-r '^('some header' 'another header') cpu% echo $#h 2 echo $h(1) -r some header this is the big advantage of rc over unix sh, where you "have" "to" "quote" "anything" "that" "can" "have" "spaces", because the shell just reexpands it.