R/command_line.R

Defines functions open_sesame cl_open_ff

Documented in cl_open_ff open_sesame

#' @title
#' Open a File in a Specific Application
#'
#' @param app Path to the Application
#' @export

cl_open_ff <-
  function(app) {
    function(file) {
      file <- normalizePath(
        path = file,
        mustWork = TRUE
      )


      system(sprintf("open -a %s %s", app, file))
    }
  }



#' @title
#' Generic Command Line Open Command
#' @export

open_sesame <-
  function(file) {
    file <- normalizePath(
      path = file,
      mustWork = TRUE
    )


    system(sprintf("open %s", file))
  }
patelm9/cave documentation built on March 29, 2021, 6:28 p.m.