Files
tmuxifier/libexec/tmuxifier-load-session
Jim Myhrberg 0e2cfa2327 Enable load-session command from outside of Tmux
This means that "init" session layouts can now be used to start and/or
re-attach to your main session.

Personally I have a "main" session layout with a couple of default
windows. I can now either start that session, or re-attach to it from
outside of Tmux by just running `tmuxifier s main`, instead of manually
creating a session named "main" and then loading my windows into it.
2013-06-02 18:30:28 +03:00

23 lines
386 B
Bash
Executable File

#! /usr/bin/env bash
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-sessions); do
echo "$item"
done
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help load-session)" >&2
exit 1
fi
# Load runtime functions.
source "$TMUXIFIER/runtime.sh"
# Load session file.
load_session "$1"