new_session: Create a new tmux session

Description Usage Arguments Value Note Examples

View source: R/session.R

Description

Create a new tmux session with name name.

Usage

1
2
3
4
5
6
7
8
9
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.

Note

Prior to tmux version 2.6, the actual height is one line less than height.

Examples

1
2
3
4
5
6
## Not run: 
s <- new_session("foo", shell_command = "bash", height = 10)
list_sessions()
kill_session(s)

## End(Not run)

datascienceworkshops/tmuxr documentation built on Nov. 20, 2021, 4:11 p.m.