usethis icon indicating copy to clipboard operation
usethis copied to clipboard

Add option for `proj_activate()` in same session

Open olivroy opened this issue 4 months ago • 0 comments

I use a wrapper that allows me to switch projects only by typing the name (as opposed to giving the full path)

https://olivroy.github.io/reuseme/reference/proj_switch.html

Looks at given options in Rprofile to activate project.

# in r profile
options(reuseme.reposdir = c("~/Documents/github", "~/Documents/packages", "~/Desktop/rrr"))

let's say you want to use project in "~/Documents/github/usethis"

proj_switch("usethis")

works and gives helpful error if there is a typo. (uses rlang::arg_match().

proj_switch("usethiss")
#> Did you mean "usethis"?

So the goal of this PR would be to add the new_session to usethis::proj_activate() to eventually add it to reuseme::proj_switch().

Cheers.

olivroy avatar Feb 28 '24 15:02 olivroy