mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
fix(rbw): do not wipe rbwpw items if newer are copied
This commit is contained in:
parent
f8022980a3
commit
f3c1180f65
1 changed files with 3 additions and 1 deletions
|
|
@ -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 2>/dev/null} &|
|
||||
{sleep 20 && [[ $(<$ZSH_CACHE_DIR/rbwpw_cache) == $_random ]] && clipcopy </dev/null 2>/dev/null} &|
|
||||
}
|
||||
|
||||
function _rbwpw {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue