[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gwl-devel] variable interpolation in code snippets
From: |
Ricardo Wurmus |
Subject: |
Re: [gwl-devel] variable interpolation in code snippets |
Date: |
Wed, 29 May 2019 15:27:17 +0200 |
User-agent: |
mu4e 1.2.0; emacs 26.2 |
zimoun <address@hidden> writes:
> On Tue, 26 Feb 2019 at 20:05, Ricardo Wurmus <address@hidden> wrote:
>>
>> Yes, I think this is pretty nice. I’ll aim for something like this:
>>
>> --8<---------------cut here---------------start------------->8---
>> process: foo
>> data-inputs
>> named-list
>> foo = 1
>> bar = hello
>> baz = world
>> procedure # bash { cat {{data-inputs.foo}} {{data-inputs.bar}} }
>> --8<---------------cut here---------------end--------------->8---
>>
>> Haven’t thought much about it, but “named-list” (or whatever the final
>> name) would introduce a let binding or something.
>
> Yes!
> The "named-list" would be the name of the reader macro, right?
> (joke: "named-list" is a better name than "xyz-list" ;-)
I took a simpler route using keywords to tag or name items in a list.
This works now:
--8<---------------cut here---------------start------------->8---
process: foo
data-inputs
list
#:foo 1
#:bar hello
#:baz world
procedure # bash { cat {{data-inputs:foo}} {{data-inputs:bar}} }
--8<---------------cut here---------------end--------------->8---
You can choose to only tag one item if you want; it works just the same:
--8<---------------cut here---------------start------------->8---
process: foo
data-inputs
list
1
#:bar hello
world
procedure # bash { echo {{data-inputs:bar}} }
--8<---------------cut here---------------end--------------->8---
--
Ricardo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gwl-devel] variable interpolation in code snippets,
Ricardo Wurmus <=