Ah thanks! Sadly paragraph
https://www.gnu.org/software/bash/manual/bash.html#Command-Substitution
doesn't mention this behaviour. Would it be possible to add a line
describing this?
I know that it's in the manual somewhere else, but maybe you could
prevent some
unnecessary questions on this mai
Florian Mayer writes:
> file: first.sh
> . second.sh
>
> sl-get(){
> sl-set
> sl-notify-change
> echo $?
> }
>
> sl-set-prompt(){
> PS1=$(sl-get)" >>"
sl-get is executed in a subshell, and any effect on the state of the
shell is forgotten after expansion.
Andreas.
--