Use new tmuxifier-resolve-command-path everywhere

This commit is contained in:
2012-04-30 02:10:43 +01:00
parent 3063c6f1f3
commit addb754ac7
2 changed files with 2 additions and 16 deletions

View File

@@ -24,14 +24,7 @@ case "$command" in
;;
* )
# Lookup command, attempt to resolve as alias if fails
! command_path="$(command -v "tmuxifier-$command")"
if [ -z "$command_path" ]; then
resolved="$(tmuxifier-alias "$command")"
if [ ! -z "$resolved" ]; then
! command_path="$(command -v "tmuxifier-$resolved")"
fi
fi
! command_path="$(tmuxifier-resolve-command-path "$command")"
if [ -z "$command_path" ]; then
echo "tmuxifier: no such command '$command'" >&2

View File

@@ -18,14 +18,7 @@ if [ -z "$command" ]; then
exit 1
fi
# Lookup command, attempt to resolve as alias if fails
! command_path="$(command -v "tmuxifier-$command")"
if [ -z "$command_path" ]; then
resolved="$(tmuxifier-alias "$command")"
if [ ! -z "$resolved" ]; then
! command_path="$(command -v "tmuxifier-$resolved")"
fi
fi
! command_path="$(tmuxifier-resolve-command-path "$command")"
if [ ! -z "$command_path" ] && has-completions "$command_path"; then
shift