Skip to content

Commit a402e73

Browse files
committed
introduce SessionCommand
SessionCommand class represents the session commands attributes. * repeat: repeat on empty command. * cancel_auto_continue: cancel auto continue on `source`. * postmortem: available on postmortem mode. * unsafe: unsafe command (not supported). Now only a few commands such as `step`, `next`, ... are `repeat`able. Maybe it fixes #764
1 parent f94a8ac commit a402e73

File tree

2 files changed

+179
-131
lines changed

2 files changed

+179
-131
lines changed

lib/debug/config.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,14 @@ def self.parse_help
469469
when /\A\s*### (.+)/
470470
cat = $1
471471
break if $1 == 'END'
472-
when /\A when (.+)/
472+
when /\A register_command (.+)/
473473
next unless cat
474474
next unless desc
475-
ws = $1.split(/,\s*/).map{|e| e.gsub('\'', '')}
475+
476+
ws = []
477+
$1.gsub(/'([a-z]+)'/){|w|
478+
ws << $1
479+
}
476480
helps[cat] << [ws, desc]
477481
desc = nil
478482
max_w = ws.max_by{|w| w.length}

0 commit comments

Comments
 (0)