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
|
# save current clipboard
|
||||||
if [[ $is_wayland ]]; then
|
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)
|
current_clipboard=$(wl-paste)
|
||||||
set -e
|
set -o errexit
|
||||||
else
|
else
|
||||||
current_clipboard=$(xsel --clipboard)
|
current_clipboard=$(xsel --clipboard)
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user