diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-02-06 11:55:38 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-02-06 11:57:28 +0100 |
commit | 052493b1ba71fe7e13554e57571fe4c793d53c3c (patch) | |
tree | 264a84c5c1a36acd1b30b8d5f5d0a8456d26f697 /plugins/git-extras | |
parent | 851899e59ea71ce8fbae738ec7aeb7a967585977 (diff) | |
download | zsh-052493b1ba71fe7e13554e57571fe4c793d53c3c.tar.gz zsh-052493b1ba71fe7e13554e57571fe4c793d53c3c.tar.bz2 zsh-052493b1ba71fe7e13554e57571fe4c793d53c3c.zip |
z: refresh $RANDOM's value outside subshell
This change references `$RANDOM` outside the subshell to refresh it for the
next subshell invocation. Otherwise, subsequent runs of the function get the
same value and, if run simultaneously, they may clobber each others' temp .z
files.
This is due to how zsh distributes RANDOM values when running inside a
subshell:
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
See: http://zsh.sourceforge.net/Doc/Release/Parameters.html#index-RANDOM
Diffstat (limited to 'plugins/git-extras')
0 files changed, 0 insertions, 0 deletions