diff options
author | Carlo Sala <carlosalag@protonmail.com> | 2023-08-24 17:20:24 +0200 |
---|---|---|
committer | Carlo Sala <carlosalag@protonmail.com> | 2023-08-24 17:25:51 +0200 |
commit | 03a0d5bbaedc732436b5c67b166cde954817cc2f (patch) | |
tree | 2835209d88663e422d1e43345b7d33c131ac81b1 | |
parent | 13a8e3d98aeeb4f5f0b98f92ace540067e58ba92 (diff) | |
download | zsh-03a0d5bbaedc732436b5c67b166cde954817cc2f.tar.gz zsh-03a0d5bbaedc732436b5c67b166cde954817cc2f.tar.bz2 zsh-03a0d5bbaedc732436b5c67b166cde954817cc2f.zip |
fix(clipboard): load clipboard on usage
Closes #8827
-rw-r--r-- | lib/clipboard.zsh | 10 |
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" "$@" +} |