‘home-bash-service-type’ doesn’t quote environment variables

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
L
Ludovic Courtès wrote on 13 Jul 2022 16:44
‘home-bash-service-type’ doesn’ t quote environment variables
(address . bug-guix@gnu.org)
87a69d9inh.fsf@inria.fr
Similar to https://issues.guix.gnu.org/54469, ‘home-bash-service-type’
doesn’t quote environment variables. For example, if you add this
service:

Toggle snippet (8 lines)
(define bash-fancy-prompt-service
(simple-service 'bash-fancy-prompt
home-bash-service-type
(home-bash-extension
(environment-variables
'(("PS1" . "\\u@\\h \\wλ "))))))

… you end up with invalid shell code:

Toggle snippet (4 lines)
$ tail -1 $(guix build /gnu/store/maz98q1skyc7md2vknkg8ima3y2bq5yr-bash_profile.drv)
export PS1=\u@\h \wλ

Ludo’.
L
L
Ludovic Courtès wrote on 13 Jul 2022 17:16
control message for bug #56540
(address . control@debbugs.gnu.org)
874jzl9h6t.fsf@gnu.org
severity 56540 important
quit
L
L
Ludovic Courtès wrote on 14 Jul 2022 01:10
Re: bug#56540: ‘home-bash-service-type’ doesn’t quote environment variables
(address . 56540-done@debbugs.gnu.org)
87zghc8v8s.fsf@gnu.org
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

Toggle quote (17 lines)
> Similar to https://issues.guix.gnu.org/54469, ‘home-bash-service-type’
> doesn’t quote environment variables. For example, if you add this
> service:
>
> (define bash-fancy-prompt-service
> (simple-service 'bash-fancy-prompt
> home-bash-service-type
> (home-bash-extension
> (environment-variables
> '(("PS1" . "\\u@\\h \\wλ "))))))
>
>
> … you end up with invalid shell code:
>
> $ tail -1 $(guix build /gnu/store/maz98q1skyc7md2vknkg8ima3y2bq5yr-bash_profile.drv)
> export PS1=\u@\h \wλ

Fixed in 8af749224fd69daee5b67295186c77becb1a4479.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 56540@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 56540
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch