From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:40116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyY6I-00015S-BE for gwl-devel@gnu.org; Tue, 26 Feb 2019 03:28:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyY6H-00026B-Iy for gwl-devel@gnu.org; Tue, 26 Feb 2019 03:28:30 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21095) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyY6F-0001n0-LN for gwl-devel@gnu.org; Tue, 26 Feb 2019 03:28:29 -0500 References: <87lg2atsxx.fsf@elephly.net> From: Ricardo Wurmus In-reply-to: Date: Tue, 26 Feb 2019 09:12:25 +0100 Message-ID: <87mumj0xzq.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: variable interpolation in code snippets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+kyle=kyleam.com@gnu.org Sender: "gwl-devel" To: zimoun Cc: gwl-devel@gnu.org zimoun writes: > A quick question. The `data-inputs` is a list, so `print > "{{data-inputs}}` should return: > "sample.bam" "hg38.fa" "abc" > Right? > > How to refer to "hg38.fa" only? > > print "{{second data-inputs}}" That=E2=80=99s not possible, unfortunately. Currently, the list is merely converted to a string, so (list "sample.bam" "hg38.fa" "abc") becomes the string =E2=80=9Csample.bam hg38.fa abc=E2=80=9D. For singleton lists t= hat=E2=80=99s exactly what you want, but it=E2=80=99s not great for longer lists. I thought about adding support for selectors, but I don=E2=80=99t know if I should. Maybe it would be better to allow for named inputs instead, which would result in process-local bindings. This would probably require changes to the records macro that we took from Guix. I=E2=80=99d prefer that over implementing a small language in a reader macro. -- Ricardo