From 97c3663849301e77e6292c8cb5f5db58183699b3 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Thu, 27 Apr 2023 09:49:11 +0200 Subject: [PATCH] Add a comment explaining why we are disabling errexit for wl-paste --- snippy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snippy b/snippy index d9c71aa..9e50058 100755 --- a/snippy +++ b/snippy @@ -349,9 +349,11 @@ run() { # save current clipboard if [[ $is_wayland ]]; then - set +e + # Disabling errexit for wl-paste, + # because it return 1 when they are nothing to paste + set +o errexit current_clipboard=$(wl-paste) - set -e + set -o errexit else current_clipboard=$(xsel --clipboard) fi