Add a comment explaining why we are disabling errexit for wl-paste
This commit is contained in:
parent
ba4e8a1d66
commit
97c3663849
6
snippy
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user