GNU bug report logs - #60341
[PATCH Home] home: services: environment-variables: Add support for literal strings.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 26 Dec 2022 18:21:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 60341 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Andrew Tropin <andrew <at> trop.in>
Cc: 60341 <at> debbugs.gnu.org
Subject: Re: bug#60341: [PATCH Home] home: services: environment-variables:
 Add support for literal strings.
Date: Tue, 03 Jan 2023 23:52:44 +0100
Hi,

Andrew Tropin <andrew <at> trop.in> skribis:

> On 2022-12-26 19:19, Ludovic Courtès wrote:

[...]

>> I found that it’s occasionally useful to be able to define shell variables
>> with a value that is to be taken literally, without shell expansion.  This
>> is what this patch implements.
>>
>> Thoughts?
>
> Hi Ludo,
>
> the code looks good.
>
> I'm a little conserned that one need to learn a new abstraction to
> properly quote the expression instead of just using " or ' inside value
> string, but we already have af4c103595a725194318f40fc5aba110772ff417 and
> with the current state of the code this change looks rational and
> idiomatic.  Also, it makes the interface more high-level, which can be
> good in some circumstances.

Yeah, the shell/Scheme mixture is a bit weird; it’s sort of in-between
because you can’t completely ignore that it’s shell code under the hood.

Looking at <https://issues.guix.gnu.org/54469>, I think we should strive
to not generate non-working shell snippets.  Automatic quoting and this
‘literal-string’ construct are a way to achieve that.

Ludo’.




This bug report was last modified 2 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.