Files
tmuxifier/libexec/tmuxifier-load-window
Jim Myhrberg d35a214e99 Add support for command aliases
* `session` and `window` commands are now know as `load-session` and
  `load-window` respectively, with aliases for their former names.
* Add short aliases for various commands.
* `help` and `completions` commands have been expanded with support for
  aliases.
* `help` command has been expanded upon with brief docs for a few more
  commands.
2012-04-22 16:43:18 +01:00

23 lines
441 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
# Load runtime functions.
source "$TMUXIFIER/runtime.sh"
if [ ! -z $TMUX ]; then
session="$(tmuxifier-current-session)"
load_window "$1"
else
echo "tmuxifier: 'window' command can only be used from within Tmux."
exit 1
fi