vamolessa / pepper

simple and opinionated modal code editor for your terminal
https://vamolessa.github.io/pepper/
372 stars 17 forks source link

Yank/Paste does not work on macOS #33

Closed hovsater closed 2 years ago

hovsater commented 2 years ago

I just noticed that I can't yank (y) or paste (Y) on macOS even though my copy-command is set to pbcopy and paste-command is set to pbpaste. Nothing happens when pressing y and Y just clears the selection without every pasting anything from the clipboard.

vamolessa commented 2 years ago

Does it work if manually invoking from a | action? Like: open a buffer, and then |pbpaste<enter> while having some text in your system clipboard? Does it paste it to the buffer?

Does selecting some text in the buffer and then |pbcopy<enter> correctly puts the buffer's selection in your system clipboard?

hovsater commented 2 years ago

Sorry for the delay, @vamolessa. It doesn't look like pbcopy and pbpaste work there either. I tried to do !pbaste without success (nothing got pasted). I also tried to select a line and then do $pbcopy without success (the line was not copied to my clipboard).

I've confirmed that pbcopy and pbpate do work in other terminal programs.

vamolessa commented 2 years ago

Would you also check the newest version (0.24.0)?

hovsater commented 2 years ago

Still nothing, unfortunately.

vamolessa commented 2 years ago

Oh I was reading the pbpaste manual and it seems that it can produce output with different encoding. Maybe try forcing to uftf8 my setting this env var before running pepper: LANG=en_US.UTF-8

hovsater commented 2 years ago

It's already set to the correct value, en_US.UTF-8. So probably not encoding related. It seems like pepper is the only program I've tested with where it doesn't work.

vamolessa commented 2 years ago

It seems to be fixed now. The culprit was libc::daemon which is deprecated on mac. On 0.26.0 it's no longer used on unix platforms.

Please reopen if you still find it not working!