Skip to content

Instantly share code, notes, and snippets.

@kleinlennart
Created May 18, 2026 19:52
Show Gist options
  • Select an option

  • Save kleinlennart/0db7de52cae101b85514079e6789cfc5 to your computer and use it in GitHub Desktop.

Select an option

Save kleinlennart/0db7de52cae101b85514079e6789cfc5 to your computer and use it in GitHub Desktop.
rstudio . for macOS zsh: Open the current directory as an RStudio Project
rstudio() {
Rscript -e 'usethis::use_rstudio()' && open -a RStudio -- *.Rproj
}
@kleinlennart

kleinlennart commented May 18, 2026

Copy link
Copy Markdown
Author

Inspired by

> Shell Command: Install 'code' command in PATH command

in VS Code

https://code.visualstudio.com/docs/setup/mac#_configure-path-with-vs-code

@kleinlennart

Copy link
Copy Markdown
Author

add to ~/.zshrc

then run:

source ~/.zshrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment