Add support for command aliases

* `session` and `window` commands are now know as `load-session` and
  `load-window` respectively, with aliases for their former names.
* Add short aliases for various commands.
* `help` and `completions` commands have been expanded with support for
  aliases.
* `help` command has been expanded upon with brief docs for a few more
  commands.
This commit is contained in:
2012-04-22 16:43:18 +01:00
parent 939583cabd
commit d35a214e99
10 changed files with 103 additions and 25 deletions

View File

@@ -25,7 +25,16 @@ case "$command" in
* )
command_path="$(command -v "tmuxifier-$command" || true)"
# Attempt to resolve aliases
if [ -z $command_path ]; then
resolved="$(tmuxifier-alias "$command")"
if [ ! -z "$resolved" ]; then
command_path="$(command -v "tmuxifier-$resolved" || true)"
fi
fi
if [ -z "$command_path" ]; then
echo "tmuxifier: no such command '$command'" >&2
exit 1
fi