Skip to content

Commit

Permalink
support clean restart (closes #95)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Feb 7, 2024
1 parent 9e3f80d commit 39dfd04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 7 additions & 3 deletions R/stubs.R
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,17 @@ hasColorConsole <- function() {
#'
#'
#' @param command A command (as a string) to be run after restarting.
#' @param clean Boolean; when `FALSE`, the current \R session (including
#' loaded packages and data objects) will be saved and restored in the
#' new session.
#'
#' @note The \code{restartSession} function was added in version 1.1.281 of
#' RStudio.
#' RStudio. Support for the `clean` argument was added for version 2024.04
#' release of RStudio; it is silently ignored in older versions of RStudio.
#'
#' @export
restartSession <- function(command = "") {
callFun("restartSession", command)
restartSession <- function(command = "", clean = FALSE) {
callFun("restartSession", command, clean)
}


Expand Down
9 changes: 7 additions & 2 deletions man/restartSession.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39dfd04

Please sign in to comment.