cheat.sh icon indicating copy to clipboard operation
cheat.sh copied to clipboard

[CLI] stealth mode not compatible with MacOS

Open weakcamel opened this issue 7 years ago • 6 comments

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.

weakcamel avatar Sep 19 '18 09:09 weakcamel

See also https://github.com/raymontag/keepassc/issues/59

weakcamel avatar Sep 19 '18 09:09 weakcamel

@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 avatar Sep 30 '18 17:09 chubin

@chubin Of course, I'll do my best to test it out.

weakcamel avatar Oct 01 '18 23:10 weakcamel

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.

c0untzer0 avatar Oct 26 '21 17:10 c0untzer0

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.

weakcamel avatar Nov 02 '21 15:11 weakcamel

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

chubin avatar Apr 18 '22 18:04 chubin