From f97cf971d813bda250edaa3757c24ef1dc986309 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Thu, 14 Jun 2018 15:36:09 +0200 Subject: Close stdout for background task that restores clipboard While we do not expect any output on stdout from the background task, keeping the file handle open means that anyone calling `pass` and waiting for stdout to be closed, will have to wait (by default) for 45 seconds. --- src/platform/darwin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platform/darwin.sh') diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh index 86eb325..a4f3515 100644 --- a/src/platform/darwin.sh +++ b/src/platform/darwin.sh @@ -11,7 +11,7 @@ clip() { local now="$(pbpaste | openssl base64)" [[ $now != $(echo -n "$1" | openssl base64) ]] && before="$now" echo "$before" | openssl base64 -d | pbcopy - ) 2>/dev/null & disown + ) >/dev/null 2>&1 & disown echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds." } -- cgit v1.2.3