Closed maxheld83 closed 1 week ago
FYI, https://github.com/posit-dev/positron/issues/1494 already discusses/addresses this issue by setting an env-var "POSITRON"
, but perhaps disambiguation "TERM_PROGRAM
" would also be beneficial.
FWIW this is as expected/designed and there would be a lot of work involved to update how this environment variable is used throughout the product, work that we don't think would be super impactful at the current time.
We do have some advice for R folks who use both VS Code and Positron in terms of .Rprofile
:
if (interactive() && Sys.getenv("RSTUDIO") == "" && Sys.getenv("POSITRON") == "") {
## code you use for better terminal behavior for R in VS Code
}
I get that Positron is a VSCode fork, so this makes sense, but it can cause some problems when you have conditional logic which is expected to trigger only in the actual VSCode (and related R extensions), as for example in https://github.com/posit-dev/positron/issues/5338.
Might also just be more idiomatic to have it return
positron
(orark
?), since that's what it is.