irb icon indicating copy to clipboard operation
irb copied to clipboard

Display better error message if no prompt mode is given

Open cobrexus opened this issue 1 year ago • 0 comments

Description

aryanbeezadhur@Aryans-MacBook-Pro ~ % irb --prompt
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/irb/init.rb:340:in `parse_opts': undefined method `upcase' for nil (NoMethodError)

        prompt_mode = opt.upcase.tr("-", "_").intern
                         ^^^^^^^
	from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/irb/init.rb:48:in `setup'
	from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/irb.rb:896:in `start'
	from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
	from /opt/homebrew/opt/ruby/bin/irb:25:in `load'
	from /opt/homebrew/opt/ruby/bin/irb:25:in `<main>'

Instead maybe list all prompt modes?

cobrexus avatar Mar 24 '24 15:03 cobrexus