diff --git a/plugins/rbw/rbw.plugin.zsh b/plugins/rbw/rbw.plugin.zsh index b6cecf8b4..8e362e17c 100644 --- a/plugins/rbw/rbw.plugin.zsh +++ b/plugins/rbw/rbw.plugin.zsh @@ -29,9 +29,11 @@ function rbwpw { echo "$service not found" return 1 fi + local _random="$RANDOM" + echo -n $_random > $ZSH_CACHE_DIR/rbwpw_cache echo -n $pw | clipcopy echo "password for $service copied!" - {sleep 20 && clipcopy /dev/null} &| + {sleep 20 && [[ $(<$ZSH_CACHE_DIR/rbwpw_cache) == $_random ]] && clipcopy /dev/null} &| } function _rbwpw {