Boolean logic is hard (and buggy? wtf?)

Fixed a bug with alias resolution not working, for reasons that are
currently beyond my understanding of shell scripting it would seem.
This commit is contained in:
2012-04-26 08:50:59 +01:00
parent 8e21664439
commit b65355a35a
3 changed files with 3 additions and 3 deletions

View File

@@ -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"