Recognize '#!/usr/bin/env Rscript' header as R script

Minor request, but it would be nice if the RStudio IDE could automatically recognize files that begin with

#!/usr/bin/env Rscript

as R script files. These are typically executable scripts without extensions, and RStudio opens them as plain text files. Obviously, you can manually change this after opening, but I end up doing this several times a day.

We're currently tracking this here: https://github.com/rstudio/rstudio/issues/5643

1 Like

Ah ha -- excellent. Sorry, I tried searching, but didn't come across that issue on GitHub. Thank you for pointing it out!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.