I'm running R 3.6.1, RStudio 1.2.5019 on macOS 10.14.3
I can set a custom console prompt as usual with
options(prompt = "foo> ")
However, if I try to use the crayon package to set a custom prompt with special formatting, RStudio only applies the formatting after I hit enter to non-active prompts. The current prompt with the cursor always retains the standard color/formatting. So,
options(prompt = crayon::blue("foo> ")
results in this:
The current prompt will always be yellow, but will turn blue once I hit enter.
This is not the case when I set the same custom prompt running R from the command line:
In this case, the prompt is immediately styled correctly.
I'm guessing that RStudio is intercepting the evaluation at some point. If possible, it would be nice to adjust how RStudio is handling this case so that custom prompts can be styled with the crayon package.