# File lib/pry/command_set.rb, line 317
    def [](pattern)
      @commands.values.select do |command|
        command.matches?(pattern)
      end.sort_by do |command|
        command.match_score(pattern)
      end.last
    end