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 <[email protected]> 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