[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63048: [Home] Shell alias values are not properly quoted
From: |
Ludovic Courtès |
Subject: |
bug#63048: [Home] Shell alias values are not properly quoted |
Date: |
Mon, 24 Apr 2023 09:57:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi!
As Ekaitz reported on Mastodon, shell alias values are not properly
quoted, which causes problem when an alias value contains double-quotes
for instance:
--8<---------------cut here---------------start------------->8---
(define (bash-serialize-aliases field-name val)
#~(string-append
#$@(map
(match-lambda
((key . #f)
"")
((key . #t)
#~(string-append "alias " #$key "\n"))
((key . value)
#~(string-append "alias " #$key "=\"" #$value "\"\n")))
val)))
--8<---------------cut here---------------end--------------->8---
The solution is to borrow and factorize the code of
‘environment-variable-shell-definitions’, which does it right.
Ludo’.
- bug#63048: [Home] Shell alias values are not properly quoted,
Ludovic Courtès <=