From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: Re: [9front] [PATCH] Update hpost to use -r header like hget
Date: Wed, 16 Dec 2020 21:34:34 +0000 (UTC) [thread overview]
Message-ID: <091fb09e-1c49-45df-a145-7519e7380848@sirjofri.de> (raw)
In-Reply-To: <50C860013C58EB44D0C12761DBFD50EA@eigenstate.org>
16.12.2020 20:50:31 ori@eigenstate.org:
> Quoth sirjofri <sirjofri+ml-9front@sirjofri.de>:
>> '-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
it. I also noticed that it worked when encapsulating the whole thing in
another `{}, but then you probably have issues with quoted arguments with
spaces ('hello: world').
I think what I did was like this, but I don't know if that makes any
sense:
h='-r<tab>'^$headers
u=`‘<tab>'{ifs='<tab>'; echo -n $h}
The whole thing is indeed an interesting challenge, especially because rc
is handling items and lists so special. Spaces don't necessarily separate
strings, items with spaces are not always quoted, etc. For example, the
visual string "this is a string" is not always a list with 3 strings. It
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)
next prev parent reply other threads:[~2020-12-16 21:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 18:02 Julien Blanchard
2020-12-15 18:42 ` ori
2020-12-16 18:16 ` Julien Blanchard
2020-12-16 18:51 ` sirjofri
2020-12-16 19:50 ` ori
2020-12-16 21:34 ` sirjofri [this message]
2020-12-16 21:52 ` ori
2020-12-16 22:55 ` sirjofri
2020-12-16 23:13 ` Steve Simon
2020-12-17 9:33 ` Julien Blanchard
2020-12-17 10:30 ` Alex Musolino
2020-12-17 11:23 ` Julien Blanchard
2020-12-18 4:35 ` ori
2020-12-16 19:54 ` estevan.cps
2020-12-18 2:25 ` magma698hfsp273p9f
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=091fb09e-1c49-45df-a145-7519e7380848@sirjofri.de \
--to=sirjofri+ml-9front@sirjofri.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).