From addb754ac77486721fe78654b026223569a3404b Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Apr 2012 02:10:43 +0100 Subject: [PATCH] Use new `tmuxifier-resolve-command-path` everywhere --- bin/tmuxifier | 9 +-------- libexec/tmuxifier-completions | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/bin/tmuxifier b/bin/tmuxifier index 0c7d2ca..1d58357 100755 --- a/bin/tmuxifier +++ b/bin/tmuxifier @@ -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 diff --git a/libexec/tmuxifier-completions b/libexec/tmuxifier-completions index d9334c3..ec24335 100755 --- a/libexec/tmuxifier-completions +++ b/libexec/tmuxifier-completions @@ -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