Method: Pry::Command.command_regex

Defined in:
lib/pry/command.rb

.command_regexObject



165
166
167
168
169
170
# File 'lib/pry/command.rb', line 165

def command_regex
  prefix = convert_to_regex(Pry.config.command_prefix)
  prefix = "(?:#{prefix})?" unless options[:use_prefix]

  /\A#{prefix}#{convert_to_regex(match)}(?!\S)/
end