Files
tmuxifier/libexec/tmuxifier-help

53 lines
1.6 KiB
Bash
Executable File

#! /usr/bin/env bash
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
tmuxifier-commands
exit
fi
case $1 in
"" )
echo "usage: tmuxifier <command> [<args>]
Some useful tmuxifier commands are:
session Load the specified session layout.
window Load the specified window layout into current session.
list List all session and window layouts.
list-sessions List session layouts.
list-windows List window layouts.
new-session Create new session layout and open it with \`\$EDITOR\`.
new-window Create new window layout and open it with \`\$EDITOR\`.
edit-session Edit specified session layout with \`\$EDITOR\`.
edit-window Edit specified window layout with \`\$EDITOR\`.
commands List all tmuxifier commands.
See 'tmuxifier help <command>' for information on a specific command."
;;
"session" )
echo "usage: tmuxifier session <layout_name>
Create a session using the session layout, unless the session already exists
in which case, we simply switch to the existing one."
;;
"window" )
echo "usage: tmuxifier window <layout_name>
Create a new window using the specified window layout in the current session."
;;
* )
command_path="$(command -v "tmuxifier-$1" || true)"
if [ -n "$command_path" ]; then
echo "Sorry, the '$1' command isn't documented yet."
echo
echo "You can view the command's source here:"
echo "$command_path"
echo
else
echo "tmuxifier: no such command \`$1'"
fi
;;
esac