GNU bug report logs - #56050
[PATCH] home: services: environment-variables: Fix XDG base directories.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Sat, 18 Jun 2022 05:26:01 UTC

Severity: normal

Tags: moreinfo, patch

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: "Philip McGrath" <philip <at> philipmcgrath.com>
Cc: 56050 <at> debbugs.gnu.org
Subject: [bug#56050] [PATCH v2 1/2] etc/guix-install.sh: Initialize XDG base directories.
Date: Mon, 04 Jul 2022 23:01:34 +0200
"Philip McGrath" <philip <at> philipmcgrath.com> skribis:

> AFAICT, this seems to work. I think this is because of a rule I didn't know about before from the section "Here Documents" under `info "(bash)Redirections"`:
>
>> If any part of *word* is quoted, the *delimiter* is the result of
>> quote removal on *word*, and the lines in the here-document
>> are not expanded.
>
> and the beginning EOF is quoted, so it works like this:
>
> $ cat quoted-here-doc.sh 
> #!/bin/sh
> cat <<"EOF" > out.sh
> export PATH="$PATH:foobar"
> EOF
> $ ./quoted-here-doc.sh 
> $ cat out.sh 
> export PATH="$PATH:foobar"
>
> I'm certainly no expert on shell quoting, though.

Woow, I learned something, thanks!  Crazy.  (I wonder what Dash does
with that, given that it doesn’t support multi-digit file descriptor
numbers for redirects…)

Ludo’.




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

Previous Next


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