Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Local inner functions in a prompt
On 12/21/18, Eric Nielsen <eric@xxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> I'm aware of https://www.zsh.org/mla/users/2011/msg00207.html and that
> there's no such thing as an inner function.
>
> But I'm surprised to see that if I declare "inner" functions inside a prompt
> function, they are not visible from "outside".
> prompt_outer_setup() {
> PS1='$(prompt_outer_main)%# '
> }
> prompt_outer_setup
You're running the function in a subshell here.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author