From c35301bd9b605c08681d37ce09f6ae5fade76466 Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Sun, 15 Dec 2019 17:22:03 -0500 Subject: [PATCH] Custom irb configuration --- ruby/.irbrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ruby/.irbrc diff --git a/ruby/.irbrc b/ruby/.irbrc new file mode 100644 index 0000000..893243b --- /dev/null +++ b/ruby/.irbrc @@ -0,0 +1,19 @@ +# Runtime Configuration for IRB (Interactive Ruby) +require 'irb/completion' + +IRB.conf[:AUTO_INDENT] = true + +# History configuration +IRB.conf[:SAVE_HISTORY] = 1000 +IRB.conf[:HISTORY_FILE] = "#{ENV["HOME"]}/.history/ruby" + +# Custom Prompt + +IRB.conf[:PROMPT][:MY_PROMPT] = { + :AUTO_INDENT => true, + :PROMPT_I => "\033[1;31m>>\033[0m ", + :PROMPT_S => "\033[1;31m\">\033[0m ", + :PROMPT_C => "\033[1;31m?>\033[0m ", + :RETURN => "\033[1;35m=>\033[0m %s\n" +} +IRB.conf[:PROMPT_MODE] = :MY_PROMPT