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 18789 invoked from network); 16 Dec 2020 21:35:51 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2020 21:35:51 -0000 Received: from oat.nine.sirjofri.de ([5.45.105.127]) by ewsd; Wed Dec 16 16:34:46 -0500 2020 Received: from sirjofri.de ([109.41.131.167]) by oat; Wed Dec 16 22:34:36 +0100 2020 Date: Wed, 16 Dec 2020 21:34:34 +0000 (UTC) From: sirjofri To: 9front@9front.org Message-ID: <091fb09e-1c49-45df-a145-7519e7380848@sirjofri.de> In-Reply-To: <50C860013C58EB44D0C12761DBFD50EA@eigenstate.org> References: <50C860013C58EB44D0C12761DBFD50EA@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <091fb09e-1c49-45df-a145-7519e7380848@sirjofri.de> List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: stable descriptor metadata engine-oriented module Subject: Re: [9front] [PATCH] Update hpost to use -r header like hget Reply-To: 9front@9front.org Precedence: bulk 16.12.2020 20:50:31 ori@eigenstate.org: > Quoth sirjofri : >> '-r '^$headers > > 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: [...] That's indeed very interesting. I noticed that when playing around with=20 it. I also noticed that it worked when encapsulating the whole thing in=20 another `{}, but then you probably have issues with quoted arguments with= =20 spaces ('hello: world'). I think what I did was like this, but I don't know if that makes any=20 sense: h=3D'-r'^$headers u=3D`=E2=80=98'{ifs=3D''; echo -n $h} The whole thing is indeed an interesting challenge, especially because rc= =20 is handling items and lists so special. Spaces don't necessarily separate= =20 strings, items with spaces are not always quoted, etc. For example, the=20 visual string "this is a string" is not always a list with 3 strings. It=20 could also be a list with two or only one string. Btw I really enjoyed your interview I listened to yesterday. sirjofri (Sorry ori for double posting this to you. It was meant for the list)