mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
home: services: environment-variables: Add support for literal strings.
* gnu/home/services.scm (<literal-string>): New record type. (environment-variable-shell-definitions): Split 'shell-quote' into 'quote-string' and 'shell-double-quote'. Add 'shell-single-quote'. Add clause for 'literal-string' records. * tests/guix-home.sh: Test it. * doc/guix.texi (Essential Home Services): Document it.
This commit is contained in:
@@ -81,7 +81,8 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT
|
||||
|
||||
(simple-service 'add-environment-variable
|
||||
home-environment-variables-service-type
|
||||
'(("TODAY" . "26 messidor")))
|
||||
`(("TODAY" . "26 messidor")
|
||||
("LITERAL" . ,(literal-string "${abc}"))))
|
||||
|
||||
(simple-service 'home-bash-service-extension-test
|
||||
home-bash-service-type
|
||||
@@ -149,6 +150,7 @@ EOF
|
||||
grep -q "the content of ~/.config/test.conf" "${HOME}/.config/test.conf"
|
||||
grep '^export PS1="\$GUIX_ENVIRONMENT λ "$' "${HOME}/.bash_profile"
|
||||
( . "${HOME}/.guix-home/setup-environment"; test "$TODAY" = "26 messidor" )
|
||||
( . "${HOME}/.guix-home/setup-environment"; test "$LITERAL" = '${abc}' )
|
||||
|
||||
# This one should still be here.
|
||||
grep "stay around" "$HOME/.config/random-file"
|
||||
|
||||
Reference in New Issue
Block a user