From adaa55365cdef1ca3ca30f1c03bd080c50d5e9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 26 May 2020 03:24:14 +0200 Subject: [PATCH] Add fast console script --- ghe-fast-tools/bin/ghe-fast-console.rb | 2 ++ ghe-fast-tools/ghe-fast-console.rb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ghe-fast-tools/bin/ghe-fast-console.rb create mode 100644 ghe-fast-tools/ghe-fast-console.rb diff --git a/ghe-fast-tools/bin/ghe-fast-console.rb b/ghe-fast-tools/bin/ghe-fast-console.rb new file mode 100644 index 0000000..0633d84 --- /dev/null +++ b/ghe-fast-tools/bin/ghe-fast-console.rb @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +sudo /usr/bin/github-fast-env --interactive /usr/lib/github-fast-env/ghe-fast-console.rb diff --git a/ghe-fast-tools/ghe-fast-console.rb b/ghe-fast-tools/ghe-fast-console.rb new file mode 100644 index 0000000..f89d38f --- /dev/null +++ b/ghe-fast-tools/ghe-fast-console.rb @@ -0,0 +1,19 @@ +#!/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