Learn R Programming

tmuxr (version 0.2.4)

new_session: Create a new tmux session

Description

Create a new tmux session with name name.

Usage

new_session(
  name = NULL,
  window_name = NULL,
  start_directory = NULL,
  width = 80,
  height = 24,
  detached = TRUE,
  shell_command = NULL
)

Arguments

name

A string. Name of the session. If NULL, the name determined by tmux, which is the next unused integer (by default starting at 0). Default: NULL.

window_name

A string. Name of initial window.

start_directory

A string. Working directory this session is run in.

width

An integer. Width of initial window. Default: 80.

height

An integer. Height of initial window. Default: 24.

detached

A logical. If FALSE, the R interpreter waits for the session to be killed. Default: TRUE.

shell_command

A string. Shell command to be invoked when creating the session.

Value

A tmuxr_session.

Examples

Run this code
# NOT RUN {
s <- new_session("foo", shell_command = "bash", height = 10)
list_sessions()
kill_session(s)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab