Class: Byebug::HistoryCommand
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
23
24
25
|
# File 'lib/byebug/commands/history.rb', line 23
def description
%{hist[ory] [num_cmds]\t\tShow byebug's command history}
end
|
.names ⇒ Object
19
20
21
|
# File 'lib/byebug/commands/history.rb', line 19
def names
%w(history)
end
|
Instance Method Details
#execute ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/byebug/commands/history.rb', line 7
def execute
if Setting[:autosave]
if arg = @match[:num_cmds]
size = get_int(arg, 'history', 1, Setting[:histsize])
end
print History.to_s(size || Setting[:histsize])
else
errmsg "Not currently saving history. Enable it with \"set autosave\"\n"
end
end
|
#regexp ⇒ Object
3
4
5
|
# File 'lib/byebug/commands/history.rb', line 3
def regexp
/^\s* hist(?:ory)? (?:\s+(?<num_cmds>.+))? \s*$/x
end
|