Correctly resolve aliases in help command.

This resolves issue #1.
This commit is contained in:
2012-04-30 02:08:40 +01:00
parent 7d2c9aa49f
commit 3063c6f1f3
3 changed files with 27 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
#! /usr/bin/env bash
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
if [ -n "$1" ]; then
! command_path="$(command -v "tmuxifier-$1")"
if [ -z "$command_path" ]; then
resolved="$(tmuxifier-alias "$1")"
if [ -n "$resolved" ]; then
! command_path="$(command -v "tmuxifier-$resolved")"
fi
fi
fi
if [ -n "$command_path" ]; then
echo "$command_path"
else
exit 1
fi