summaryrefslogtreecommitdiff
path: root/plugins/z
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2019-02-15 10:51:57 -0700
committerTuowen Zhao <ztuowen@gmail.com>2019-02-15 10:51:57 -0700
commitfb141c2257f648cd29b64cbd3f2ca9123f6e427f (patch)
treea7e56fe7edad0e231aaa4ff0f6f74ce0bad1d368 /plugins/z
parent89c9e8a7bc177d4cff6ba8d28cf6b57a9a603095 (diff)
parent965a27aa69b49f4e447bcaae913e71a010f7d141 (diff)
downloadzsh-fb141c2257f648cd29b64cbd3f2ca9123f6e427f.tar.gz
zsh-fb141c2257f648cd29b64cbd3f2ca9123f6e427f.tar.bz2
zsh-fb141c2257f648cd29b64cbd3f2ca9123f6e427f.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/z')
-rw-r--r--plugins/z/z.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/z/z.sh b/plugins/z/z.sh
index 4fc75dc6a..5fe6d5266 100644
--- a/plugins/z/z.sh
+++ b/plugins/z/z.sh
@@ -222,10 +222,16 @@ if type compctl >/dev/null 2>&1; then
if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then
_z_precmd() {
(_z --add "${PWD:a}" &)
+ # Reference $RANDOM to refresh its value inside the subshell
+ # Otherwise, multiple runs get the same value
+ : $RANDOM
}
else
_z_precmd() {
(_z --add "${PWD:A}" &)
+ # Reference $RANDOM to refresh its value inside the subshell
+ # Otherwise, multiple runs get the same value
+ : $RANDOM
}
fi
[[ -n "${precmd_functions[(r)_z_precmd]}" ]] || {