github-fast-envd/ghe-fast-tools/ghe-fast-console.rb

20 lines
477 B
Ruby
Raw Normal View History

2020-05-26 03:24:14 +02:00
#!/data/github/current/bin/safe-ruby
require "irb"
ARGV.append("--prompt=default")
ARGV.append("--readline")
ENV["IRBRC"], ENV["IRBRC_WAS"] = "/data/github/current/config/console/irbrc.rb", ENV["IRBRC"]
require "irb/completion"
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
IRB.conf[:LOAD_MODULES] << 'irb/completion'
end
IRB.start