summaryrefslogtreecommitdiff
path: root/lib/clipboard.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2023-11-04 18:38:46 -0700
committerTuowen Zhao <ztuowen@gmail.com>2023-11-04 18:38:46 -0700
commit4d908094fdc2a0c0e9a0a072eba213fab7adef43 (patch)
tree7c17e70bcdeebbe96c84d849bdf17882007480d8 /lib/clipboard.zsh
parent4b0bbc0b263a150eb9a9b59f196914629be06a9b (diff)
parent632ed413a9ce62747ded83d7736491b081be4b49 (diff)
downloadzsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.gz
zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.bz2
zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.zip
Merge remote-tracking branch 'github/master'HEADmaster
Diffstat (limited to 'lib/clipboard.zsh')
-rw-r--r--lib/clipboard.zsh10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/clipboard.zsh b/lib/clipboard.zsh
index 2f3b6bcad..4b37abc9b 100644
--- a/lib/clipboard.zsh
+++ b/lib/clipboard.zsh
@@ -100,8 +100,8 @@ function detect-clipboard() {
fi
}
-# Detect at startup. A non-zero exit here indicates that the dummy clipboards were set,
-# which is not really an error. If the user calls them, they will attempt to redetect
-# (for example, perhaps the user has now installed xclip) and then either print an error
-# or proceed successfully.
-detect-clipboard || true
+function clipcopy clippaste {
+ unfunction clipcopy clippaste
+ detect-clipboard || true # let one retry
+ "$0" "$@"
+}