class Byebug::PSCommand
def description
def description %{ps expression Evaluate expression, an array, sort and columnize its value} end
def execute
def execute out = StringIO.new run_with_binding do |b| if Command.settings[:stack_on_error] vals = bb_eval(@match.post_match, b) else vals = bb_warning_eval(@match.post_match, b) end if vals.is_a?(Array) vals = vals.map{|item| item.to_s} print "#{columnize(vals.sort!, Command.settings[:width])}\n" else PP.pp(vals, out) print out.string end end rescue out.puts $!.message end
def names
def names %w(ps) end
def regexp
def regexp /^\s* ps\s+/x end