Improve --help and --complete argument handling

This commit is contained in:
2013-06-03 09:32:13 +03:00
parent 7d91ca4292
commit f9c91e5fcd
17 changed files with 83 additions and 24 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 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