From b08781e2a6e183986eb1c24f51cdeff879b7a6af Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 25 Feb 2017 14:59:51 +0100 Subject: clip: sleep may require argv[0] to be sleep --- src/password-store.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/password-store.sh b/src/password-store.sh index ce140db..17142f0 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -153,7 +153,7 @@ clip() { local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)" echo -n "$1" | xclip -selection "$X_SELECTION" || die "Error: Could not copy data to the clipboard" ( - ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" ) + ( exec -a "$sleep_argv0" bash <<<"trap 'kill %1' TERM; sleep '$CLIP_TIME' & wait" ) local now="$(xclip -o -selection "$X_SELECTION" | base64)" [[ $now != $(echo -n "$1" | base64) ]] && before="$now" -- cgit v1.2.3