mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
28 lines
523 B
Bash
Executable File
28 lines
523 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-windows); do
|
|
echo "$item"
|
|
done
|
|
exit
|
|
fi
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "$(tmuxifier-help load-window)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Load runtime functions.
|
|
source "$TMUXIFIER/runtime.sh"
|
|
|
|
if [ ! -z $TMUX ]; then
|
|
session="$(tmuxifier-current-session)"
|
|
load_window "$1"
|
|
else
|
|
echo "tmuxifier: 'load-window' command can only be used from within Tmux."
|
|
exit 1
|
|
fi
|