diff --git a/libexec/tmuxifier-help b/libexec/tmuxifier-help index 7b5646f..f227bf1 100755 --- a/libexec/tmuxifier-help +++ b/libexec/tmuxifier-help @@ -2,9 +2,15 @@ set -e [ -n "$TMUXIFIER_DEBUG" ] && set -x +# Provide tmuxifier completions +if [ "$1" == "--complete" ]; then + tmuxifier-commands + exit +fi + case $1 in "" ) - echo "Usage: tmuxifier [] + echo "usage: tmuxifier [] Some useful tmuxifier commands are: session Load the specified session layout. @@ -12,14 +18,25 @@ Some useful tmuxifier commands are: 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\`. + 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 ' for information on a specific command." ;; + "session" ) + echo "usage: tmuxifier session + +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 + +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