diff --git a/bin/tmuxifier b/bin/tmuxifier index 281182a..0c7d2ca 100755 --- a/bin/tmuxifier +++ b/bin/tmuxifier @@ -26,7 +26,7 @@ case "$command" in * ) # Lookup command, attempt to resolve as alias if fails ! command_path="$(command -v "tmuxifier-$command")" - if [ ! -n $? ]; then + if [ -z "$command_path" ]; then resolved="$(tmuxifier-alias "$command")" if [ ! -z "$resolved" ]; then ! command_path="$(command -v "tmuxifier-$resolved")" diff --git a/libexec/tmuxifier-completions b/libexec/tmuxifier-completions index e42b981..d9334c3 100755 --- a/libexec/tmuxifier-completions +++ b/libexec/tmuxifier-completions @@ -20,7 +20,7 @@ fi # Lookup command, attempt to resolve as alias if fails ! command_path="$(command -v "tmuxifier-$command")" -if [ ! -n $? ]; then +if [ -z "$command_path" ]; then resolved="$(tmuxifier-alias "$command")" if [ ! -z "$resolved" ]; then ! command_path="$(command -v "tmuxifier-$resolved")" diff --git a/libexec/tmuxifier-help b/libexec/tmuxifier-help index 34e6042..db7b6a8 100755 --- a/libexec/tmuxifier-help +++ b/libexec/tmuxifier-help @@ -12,7 +12,7 @@ command="$1" # Lookup command, attempt to resolve as alias if fails ! command_path="$(command -v "tmuxifier-$command")" -if [ ! -n $? ]; then +if [ -z "$command_path" ]; then resolved="$(tmuxifier-alias "$command")" if [ ! -z "$resolved" ]; then command="$resolved"