mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/irb.rb, lib/irb/ext/save-history.rb: Add documentation on how to
enabled irb history [ruby-core:51347] [Bug #7679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e195e181e6
commit
f11ff34d8f
3 changed files with 24 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Feb 5 08:03:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* lib/irb.rb, lib/irb/ext/save-history.rb: Add documentation on how to
|
||||
enabled irb history [ruby-core:51347] [Bug #7679]
|
||||
|
||||
Tue Feb 5 07:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* lib/irb.rb, lib/irb/context.rb: Add documentation on how to enable
|
||||
|
|
12
lib/irb.rb
12
lib/irb.rb
|
@ -117,6 +117,18 @@ STDOUT.sync = true
|
|||
#
|
||||
# require 'irb/completion'
|
||||
#
|
||||
# === History
|
||||
#
|
||||
# By default, irb disables history and will not store any commands you used.
|
||||
#
|
||||
# If you want to enable history, add the following to your +.irbrc+:
|
||||
#
|
||||
# IRB.conf[:SAVE_HISTORY] = 1000
|
||||
#
|
||||
# This will now store the last 1000 commands in <code>~/.irb_history</code>.
|
||||
#
|
||||
# See IRB::Context#save_history= for more information.
|
||||
#
|
||||
# == Customizing the IRB Prompt
|
||||
#
|
||||
# In order to customize the prompt, you can change the following Hash:
|
||||
|
|
|
@ -29,6 +29,13 @@ module IRB
|
|||
|
||||
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
|
||||
# #init_save_history with this context.
|
||||
#
|
||||
# Will store the number of +val+ entries of history in the #history_file
|
||||
#
|
||||
# Add the following to your +.irbrc+ to change the number of history
|
||||
# entries stored to 1000:
|
||||
#
|
||||
# IRB.conf[:SAVE_HISTORY] = 1000
|
||||
def save_history=(val)
|
||||
IRB.conf[:SAVE_HISTORY] = val
|
||||
if val
|
||||
|
|
Loading…
Add table
Reference in a new issue