Closed ivan-avalos closed 3 years ago
Thanks for the report!
This must be caused by the way the delayed clipboard clearing is set up. It might not be supported on macOS. I might have to find a different way to do this then.
This seems to occur after the 20 seconds, indeed, and the clipboard isn't being cleared. Perhaps password-store
code could give you a hint: https://git.zx2c4.com/password-store/tree/src/password-store.sh#n155
Is there a way to disable clipboard clearing for now? Until this issue if fixed.
Oh, I closed accidentally.
I'm looking into a proper way to achieve this at the moment. The current approach uses forking to easily spawn a background task that outlives the main prs
thread to support clearing after prs
quits. As you've noticed this method isn't supported on macOS.
This seems to occur after the 20 seconds, indeed, and the clipboard isn't being cleared. Perhaps password-store code could give you a hint: https://git.zx2c4.com/password-store/tree/src/password-store.sh#n155
Thanks for the hint. Though I don't think this nicely supports reverting clipboard contents after clearing, it may be a nice temporary fix.
Is there a way to disable clipboard clearing for now? Until this issue if fixed.
Not at the moment. If you're calling through an alias or function, you may be able to hide the error with:
prs copy 2>&1 /dev/null
Otherwise, would a --no-clear
flag suffice? That's something I can quickly add.
Otherwise, would a
--no-clear
flag suffice? That's something I can quickly add.
That would be nice!
Just noticed this can already be achieved through the timeout option instead. Forgot about that. A timeout of 0 won't do the clearing, which essentially is the same as --no-clear
.
prs copy --timeout 0
# or shorter
prs copy -t0
I experimented with a new clipboard timeout approach. I've not been able to test it on a macOS machine yet, but it does seem to work fine on Linux.
It would be awesome if you could give the latest build including this change for macOS a try:
https://gitlab.com/timvisee/prs/-/jobs/910479654/artifacts/browse
Changes are listed here:
I've just tested these changes on macOS, and it seems to work fine.
I've released these as part of v0.1.3
. This version should be available once the release pipeline succeeds.
Closing this now. Feel free to open this again if you're still experiencing these issues with v0.1.3
.
Also, since prs
is in early development, I'd love to get some feedback.
I'm using
prs-cli 0.1.2
in macOS Big Sur, and afterprs copy
'ing, the clipboard is cleared and the following message starts getting printed multiple times on the terminal:Let me know if you need more information!