Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11762

Re: PROMPT_COMMAND and PS1 error

From Andreas Schwab <schwab@linux-m68k.org>
Newsgroups gnu.bash.bug
Subject Re: PROMPT_COMMAND and PS1 error
Date 2015-10-25 22:59 +0100
Message-ID <mailman.1047.1445810391.7904.bug-bash@gnu.org> (permalink)
References <562CFEFE.7070306@me.com>

Show all headers | View raw


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."

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: PROMPT_COMMAND and PS1 error Andreas Schwab <schwab@linux-m68k.org> - 2015-10-25 22:59 +0100

csiph-web