class Byebug::HistoryCommand - byebug-11.0.1 Documentation

# class Byebug::HistoryCommand

Show history of byebug commands.

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/history.rb, line 19
        def self.description
          <<-DESCRIPTION
            hist[ory][ num_cmds]

            #{short_description}
          DESCRIPTION
        end

regexp() click to toggle source

    # File lib/byebug/commands/history.rb, line 15
    def self.regexp
      /^\s* hist(?:ory)? (?:\s+(?<num_cmds>.+))? \s*$/x
    end

short_description() click to toggle source

    # File lib/byebug/commands/history.rb, line 27
    def self.short_description
      "Shows byebug's history of commands"
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/history.rb, line 31
    def execute
      history = processor.interface.history

      size, = get_int(@match[:num_cmds], "history", 1) if @match[:num_cmds]

      puts history.to_s(size)
    end