Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11769
| From | Florian Mayer <mayerflorian@me.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: PROMPT_COMMAND and PS1 error |
| Date | 2015-10-26 14:21 +0100 |
| Message-ID | <mailman.1073.1445865707.7904.bug-bash@gnu.org> (permalink) |
| References | <562CFEFE.7070306@me.com> <87r3kiobhw.fsf@igel.home> |
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 mailing list by (maybe redundantly)
including some important
informations at the right spots in the reference manual.
Best regards
>> ==== 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.
>
Back to gnu.bash.bug | Previous | Next | Find similar
Re: PROMPT_COMMAND and PS1 error Florian Mayer <mayerflorian@me.com> - 2015-10-26 14:21 +0100
csiph-web