ruby/irb#1183 added a startup banner to irb, featuring a small gem logo, version,
a rotating tip, and the current directory, shown when IRB is launched.
bin/rails console never goes through IRB.start: Rails::Console
sets up prompts/backtrace filtering and calls IRB::Irb.new.run(IRB.conf)
directly. So that banner never shows up in a Rails console session.
I’d like to propose a Rails-flavored equivalent for bin/rails console:
Reuse IRB’s existing gem-logo art
Version line shows Rails <version> - Ruby <version> (<env>)
The rotating tip is about the Rails console helpers (app, helper,
controller, reload!) instead of IRB’s generic tips.
The directory line shows Rails.root instead of raw Dir.pwd.
I have a working patch in railties/lib/rails/commands/console/irb_console.rb
plus tests, I would be happy to open a PR if this seems like a good idea.
Hey @Stan_Lo . I don’t like the banner: I LOVE it ahah.
Sadly I’m not very good with ASCII Art, so I’m trying to tweak it with some scripts, starting from the 32x32 favicon. I’ll keep on trying, your opinion is super useful, thanks a lot.