find_command_possibilities(meth)
protected
this is the logic that takes the command name passed in by the user and
determines whether it is an unambiguous substrings of a command or alias
name.
# File lib/bundler/vendor/thor/lib/thor.rb, line 469
def find_command_possibilities(meth)
len = meth.to_s.length
possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
unique_possibilities = possibilities.map { |k| map[k] || k }.uniq
if possibilities.include?(meth)
[meth]
elsif unique_possibilities.size == 1
unique_possibilities
else
possibilities
end
end