class Thor

def find_command_possibilities(meth)

alias name.
and determines whether it is an unambiguous substrings of a command or
this is the logic that takes the command name passed in by the user
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