Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG Report] A incorrect behavior of the shell variable $RANDOM



On Sat, Jan 7, 2023 at 12:09 PM 万 在舟 <wanzzmicro@xxxxxxxxxxx> wrote:
>
> Description: $RANDOM is always the same value when I try to use it in “$()” expression.

This is working as intended. From `man zshparam`:

> subshells that reference RANDOM will result in identical pseudo-random values unless the value of RANDOM is referenced or seeded in the parent shell in between subshell invocations.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author