[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PROMPT_COMMAND and PS1 error
From: |
Andreas Schwab |
Subject: |
Re: PROMPT_COMMAND and PS1 error |
Date: |
Sun, 25 Oct 2015 22:59:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Florian Mayer <mayerflorian@me.com> 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.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."