aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb.rb
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-04 22:36:22 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-04 22:36:22 +0000
commite195e181e6f2bfd3c0386300688cd1270780f37c (patch)
treea6b25a0c74080fba816d7ab54f07d633cd2c0ed6 /lib/irb.rb
parent9cfc40ab96a17304dc836fdc9a807ab85dde2917 (diff)
downloadruby-e195e181e6f2bfd3c0386300688cd1270780f37c.tar.gz
* lib/irb.rb, lib/irb/context.rb: Add documentation on how to enable
auto-indentation and autocompletion using irbrc and irb_context [ruby-core:51209] [Bug #7642] and [ruby-core:51348] [Bug #7680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 6c7a9d1eab..755fb050ae 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -105,6 +105,18 @@ STDOUT.sync = true
# IRB.conf[:PROMPT] = {...}
# IRB.conf[:DEBUG_LEVEL]=0
#
+# === Auto indentation
+#
+# To enable auto-indent mode in irb, add the following to your +.irbrc+:
+#
+# IRB.conf[:AUTO_INDENT] = true
+#
+# === Autocompletion
+#
+# To enable autocompletion for irb, add the following to your +.irbrc+:
+#
+# require 'irb/completion'
+#
# == Customizing the IRB Prompt
#
# In order to customize the prompt, you can change the following Hash:
@@ -114,19 +126,18 @@ STDOUT.sync = true
# This example can be used in your +.irbrc+
#
# IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode
+# :AUTO_INDENT => true # enables auto-indent mode
# :PROMPT_I => nil, # normal prompt
# :PROMPT_S => nil, # prompt for continuated strings
# :PROMPT_C => nil, # prompt for continuated statement
# :RETURN => " ==>%s\n" # format to return value
# }
#
-# Then, invoke irb with the above prompt mode by:
-#
-# irb --prompt my-prompt
+# IRB.conf[:PROMPT_MODE] = :MY_PROMPT
#
-# Or, add the following in your +.irbrc+:
+# Or, invoke irb with the above prompt mode by:
#
-# IRB.conf[:PROMPT_MODE] = :MY_PROMPT
+# irb --prompt my-prompt
#
# Constants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the
# prompt specification, some special strings are available: