cheat.sh
cheat.sh copied to clipboard
[CLI] stealth mode not compatible with MacOS
When you try to use stealth mode on a Mac, the dependency on xsel is not met:
$ cht.sh --shell python
DEPENDENCY: please install "xsel" for "copy"
type 'help' for the cht.sh shell help
xsel is not available on MacOS and even if, it wouldn't do what's needed.
Likely it's pbcopy/pbpaste which should be used instead.
See also https://github.com/raymontag/keepassc/issues/59
@weakcamel Thank you very much for reporting. Unfortunately, I don't have a Mac OS X installation at hand. Could you please help me and test my fix, after I do it?
@chubin Of course, I'll do my best to test it out.
Is there compatibility for stealth mode in MacOs yet? I'm on macOS Big Sur (11.5.2) and it seems like it's not working.
I just tried and I don't see the complaint about xsel anymore (there's one about dependency on rlwrap but that's luckily available via Homebrew). It still doesn't seem to work though - selecting text in any window (including the very same terminal) has no effect.
If I understand it right, the problem is that on Mac OS X the text is not autocopied into the buffer.
There are several tools that you can use for it, e.g. macpaste.
More details:
https://apple.stackexchange.com/questions/21595/
Also, you can just explicitly press Mac-c when selecting the text