Skip to content

Commit

Permalink
introduce SessionCommand
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ko1 committed Nov 4, 2022
1 parent f94a8ac commit a402e73
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 131 deletions.
8 changes: 6 additions & 2 deletions lib/debug/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,14 @@ def self.parse_help
when /\A\s*### (.+)/
cat = $1
break if $1 == 'END'
when /\A when (.+)/
when /\A register_command (.+)/
next unless cat
next unless desc
ws = $1.split(/,\s*/).map{|e| e.gsub('\'', '')}

ws = []
$1.gsub(/'([a-z]+)'/){|w|
ws << $1
}
helps[cat] << [ws, desc]
desc = nil
max_w = ws.max_by{|w| w.length}
Expand Down
Loading

0 comments on commit a402e73

Please sign in to comment.