    # File lib/chef/knife.rb, line 181
        def self.subcommand_class_from(args)
          command_words = args.select {|arg| arg =~ /^(([[:alnum:]])[[:alnum:]\_\-]+)$/ }

          subcommand_class = nil

          while ( !subcommand_class ) && ( !command_words.empty? )
            snake_case_class_name = command_words.join("_")
            unless subcommand_class = subcommands[snake_case_class_name]
              command_words.pop
            end
          end
          # see if we got the command as e.g., knife node-list
          subcommand_class ||= subcommands[args.first.gsub('-', '_')]
          subcommand_class || subcommand_not_found!(args)
        end