Update help and error messages with more details

This commit is contained in:
2012-04-22 19:07:15 +01:00
parent 7bebd6fac9
commit 2ba53640cd
5 changed files with 34 additions and 2 deletions

View File

@@ -43,22 +43,44 @@ See 'tmuxifier help <command>' for information on a specific command."
"load-session" )
echo "usage: tmuxifier load-session <layout_name>
Aliases: session, ses, s
Create a session using the session layout, unless the session already exists
in which case, we simply switch to the existing one."
;;
"load-window" )
echo "usage: tmuxifier load-window <layout_name>
Aliases: window, win, w
Create a new window using the specified window layout in the current session."
;;
"new-session" )
echo "usage: tmuxifier new-session <layout_name>
Aliases: new-ses, ns
Create a new session layout and open it for editing in \$EDITOR."
;;
"new-window" )
echo "usage: tmuxifier new-window <layout_name>
Aliases: new-win, ws
Create a new window layout and open it for editing in \$EDITOR."
;;
"edit-session" )
echo "usage: tmuxifier edit-session <layout_name>
Aliases: edit-ses, es
Open specified session layout for editing in \$EDITOR."
;;
"edit-window" )
echo "usage: tmuxifier edit-window <layout_name>
Aliases: edit-win, ew
Open specified window layout for editing in \$EDITOR."
;;
* )

View File

@@ -10,6 +10,11 @@ if [ "$1" == "--complete" ]; then
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help load-session)" >&2
exit 1
fi
# Load runtime functions.
source "$TMUXIFIER/runtime.sh"

View File

@@ -10,6 +10,11 @@ if [ "$1" == "--complete" ]; then
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help load-window)" >&2
exit 1
fi
# Load runtime functions.
source "$TMUXIFIER/runtime.sh"

View File

@@ -3,7 +3,7 @@ set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
if [ -z "$1" ]; then
echo "usage: tmuxifier new-session <layout_name>" >&2
echo "$(tmuxifier-help new-session)" >&2
exit 1
fi

View File

@@ -3,7 +3,7 @@ set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
if [ -z "$1" ]; then
echo "usage: tmuxifier new-window <layout_name>" >&2
echo "$(tmuxifier-help new-window)" >&2
exit 1
fi