Merge branch 'master' into new-init-system

This commit is contained in:
2013-06-03 09:50:38 +03:00
17 changed files with 98 additions and 52 deletions

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier alias <alias>
Resolve a command alias to it's full name."

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier commands
List all available commands, includes internal commands not intended for

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier completion <command>
Print a list of available completions for specified command."
@@ -11,7 +14,7 @@ Print a list of available completions for specified command."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
if calling-complete "$@"; then
tmuxifier-commands
exit
fi
@@ -21,7 +24,7 @@ has-completions() {
}
if [ -z "$1" ]; then
echo "$(tmuxifier-help completions)" >&2
echo "$(tmuxifier-help completions $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier current-session
Outputs the name of the current Tmux session."

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier edit-session <layout_name>
Aliases: edit-ses, eses, es
@@ -13,15 +16,13 @@ Open specified session layout for editing in \$EDITOR."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-sessions); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-sessions
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help edit-session)" >&2
echo "$(tmuxifier-help edit-session $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier edit-window <layout_name>
Aliases: edit-win, ewin, ew
@@ -13,15 +16,13 @@ Open specified window layout for editing in \$EDITOR."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-windows); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-windows
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help edit-window)" >&2
echo "$(tmuxifier-help edit-window $@)" >&2
exit 1
fi

View File

@@ -2,14 +2,17 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
tmuxifier-help
exit
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
if calling-complete "$@"; then
tmuxifier-commands
exit
fi
@@ -18,7 +21,6 @@ has-help() {
grep -i "^# Provide tmuxifier help" "$1" >/dev/null
}
command="$1"
if [ -z "$1" ]; then
echo "usage: tmuxifier <command> [<args>]
@@ -50,7 +52,7 @@ fi
if has-help "$command_path"; then
shift
exec "$command_path" --help "$@"
exec "$command_path" "$@" --help
else
command="$(basename "$command_path")"
command="${command/tmuxifier\-/}"

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier list
Aliases: l

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier list-sessions
Aliases: list-ses, lses, ls

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier list-windows
Aliases: list-win, lwin, lw

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier load-session <layout_name>
Aliases: session, ses, s
@@ -14,15 +17,13 @@ in which case, we simply attach/switch to the existing one."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-sessions); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-sessions
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help load-session)" >&2
echo "$(tmuxifier-help load-session $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier load-window <layout_name>
Aliases: window, win, w
@@ -13,15 +16,13 @@ Create a new window using the specified window layout in the current session."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-windows); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-windows
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help load-window)" >&2
echo "$(tmuxifier-help load-window $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier new-session <layout_name>
Aliases: new-ses, nses, ns
@@ -13,15 +16,13 @@ Create a new session layout and open it for editing in \$EDITOR."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-sessions); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-sessions
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help new-session)" >&2
echo "$(tmuxifier-help new-session $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier new-window <layout_name>
Aliases: new-win, nwin, nw
@@ -13,15 +16,13 @@ Create a new window layout and open it for editing in \$EDITOR."
fi
# Provide tmuxifier completions
if [ "$1" == "--complete" ]; then
for item in $(tmuxifier-list-windows); do
echo "$item"
done
if calling-complete "$@"; then
tmuxifier-list-windows
exit
fi
if [ -z "$1" ]; then
echo "$(tmuxifier-help new-window)" >&2
echo "$(tmuxifier-help new-window $@)" >&2
exit 1
fi

View File

@@ -2,8 +2,11 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier resolve-command-path <command_or_alias>
Outputs the absolute path to the given command or command alias."

View File

@@ -2,12 +2,15 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"
# Provide tmuxifier help
if [ "$1" == "--help" ]; then
if calling-help "$@"; then
echo "usage: tmuxifier version
Outputs Tmuxifier version."
exit
fi
echo "0.6.0"
echo "0.6.1"