Re: PROMPT_COMMAND and PS1 error

2015-10-26 Thread Florian Mayer
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

Re: PROMPT_COMMAND and PS1 error

2015-10-25 Thread Andreas Schwab
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. --