R/pastehistory.R

pastehistory <- function() {
  tmphistory <- tempfile()
  savehistory(tmphistory)
  histcon <- file(tmphistory, open = "r")
  history <- readLines(histcon)
  close.connection(histcon)
  last <- length(history)
  last_command <- history[last]
  insertText(last_command)
}
calligross/pastehistory documentation built on May 13, 2019, 11:01 a.m.