summaryrefslogtreecommitdiffstats
path: root/bridge/lib/bridge/bin/create
blob: 2df8b21455ee2b5f5cdee65d4071262caec3f248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
#
# Create a new session.
#
## SYNOPSIS
#
#     bridge create SESSION [COMMAND [ARGS ...]]
#
# COMMAND defaults to $SHELL (by implication / tmux)
#
set -euf
target="$1"; shift
tmux -L bridge new-session -d -s "$target" "$@"
tmux -L bridge set-buffer READY.
exec "$(dirname $0)/attach" "$target"