# File lib/pry/command.rb, line 145
      def group(name=nil)
        @group ||= if name
                     name
                   else
                     case Pry::Method(block).source_file
                     when %r{/pry/.*_commands/(.*).rb}
                       $1.capitalize.gsub(/_/, " ")
                     when %r{(pry-\w+)-([\d\.]+([\w\d\.]+)?)}
                       name, version = $1, $2
                       "#{name.to_s} (v#{version.to_s})"
                     when /pryrc/
                       "~/.pryrc"
                     else
                       "(other)"
                     end
                   end
      end