|
From: | Michael Käppler |
Subject: | Re: Question on LilyDev3 mkosi/debian/mkosi.postinst script |
Date: | Sat, 20 Nov 2021 12:57:58 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 |
Hi John, I am responsible for changing the line you mentioned in 'mkosi.postinst'. See https://github.com/fedelibre/LilyDev/pull/14 tl;dr; It did not work the way it was intended before this change (but for you it did work as you copied and pasted it instead of piping it through `cat`) The thing is that it is part of a 'heredoc' string, which is written to .bashrc. Without escaping the '$', the shell will evaluate the result of $(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)") before writing to .bashrc, which is not what we want. Instead it should evaluate it at runtime. So you should simply remove the backslash before $(declare ... All the best, Michael Am 19.11.2021 um 23:03 schrieb Dan Eble:
On Nov 19, 2021, at 14:37, John Wheeler <wheelerwjx9@runbox.com> wrote:I have used the .bashrc script extracted from LilyDev3/mkosi/debian/mkosi.postinst file in the past to set up a user for LilyPond development work and the PS1 value seemed to work. This morning I tried to do that again on a new machine and the PS1 value does not work correctly. The variable is set in a line: export PS1='[\u@\h:\W\$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")]\$ ' where the substring ":\W\$(declare" did not have the \ before the $ in the earlier version. Now, I am seeing the (declare -F ...") on my command line. I am wondering if the $ needs to be doubled, ie, ":\W\$$(declare" so that the "(declare" works correctly? Thank you, John Wheeler
[Prev in Thread] | Current Thread | [Next in Thread] |