class Byebug::UntracevarCommand


Stop tracing a global variable.

def description

def description
  prettify <<-EOD
    untr[acevar] <variable>
    Stop tracing global variable <variable>.
  EOD
end

def execute

def execute
  var = @match[1]
  if global_variables.include?(:"#{var}")
    eval("untrace_var(:\"#{var}\")")
    puts pr('trace.messages.undo', var: var)
  else
    errmsg pr('trace.errors.not_global', var: var)
  end
end

def names

def names
  %w(untracevar)
end

def regexp

def regexp
  /^\s* untr(?:acevar)? (?:\s+ (\S+))? \s*$/x
end