mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Initial commit
This commit is contained in:
22
libexec/tmuxifier-window
Executable file
22
libexec/tmuxifier-window
Executable file
@@ -0,0 +1,22 @@
|
||||
#! /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
|
||||
|
||||
# Load runtime functions.
|
||||
source "$TMUXIFIER/runtime.sh"
|
||||
|
||||
if [ ! -z $TMUX ]; then
|
||||
session="$(tmuxifier-current-session)"
|
||||
load_window "$1"
|
||||
else
|
||||
echo "ERROR: 'window' command can only be used from within Tmux."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user