Better error message when a sub command is missing.

This commit is contained in:
Chris Eppstein 2011-06-11 21:54:56 -07:00
parent ab25ba0b40
commit 2be7567bb2

View File

@ -16,8 +16,10 @@ module Compass::Commands
matching.first
elsif name =~ /^-/
nil
else
elsif matching.size > 1
raise Compass::Error, "Ambiguous abbreviation '#{name}'. Did you mean one of: #{matching.join(", ")}"
else
raise Compass::Error, "Command not found: #{name}"
end
end
def abbreviation?(name)