r-lib / prettycode

Syntax highlight R code in the terminal
https://r-lib.github.io/prettycode/
Other
101 stars 9 forks source link

Is it broken again? #9

Closed gaborcsardi closed 5 years ago

gaborcsardi commented 5 years ago

IDK what has changed again in R's S3 search, but in 3.6.0, prettycode::prettycode() does not work, apparently.....

gaborcsardi commented 5 years ago

OK, it seems that with the changes in https://github.com/lionel-/r-source/pull/4#issuecomment-373518924 (Third patch), there is no way to make prettycode work again with R 3.6.0.

That's a pity, it seems that I'll have to stay at R 3.5.3 forever now. :)

gaborcsardi commented 5 years ago

A workaround would be to define a ! operator, and then type !fun instead of just fun. I think this is as good as it gets...

IndrajeetPatil commented 5 years ago

Yeah, I can confirm that on a Windows machine this doesn't work with R 3.6.0, even for pretty-print with ! operator.

gaborcsardi commented 5 years ago

You probably don't have color support in your terminal/gui. If you think that it should work, then please provide more information about your platform.

IndrajeetPatil commented 5 years ago

It used to work on my computer, so I am pretty sure that my terminal does have color support: https://twitter.com/patilindrajeets/status/1039538332777238528

mdequeljoe commented 5 years ago

This appears fixed in R 3.6.1. From the release notes:

print()ing and auto-printing no longer differs for functions with a user defined print.function, thanks to Bill Dunlap's report.

https://stat.ethz.ch/pipermail/r-announce/2019/000643.html

gaborcsardi commented 5 years ago

@mdequeljoe It is fixed in R 3.6.1 indeed!

IndrajeetPatil commented 5 years ago

I can confirm that this is working again on a Windows machine as well! 👍

image