1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

added Pry.editor option for use by the edit-method command

This commit is contained in:
John Mair 2011-04-26 03:21:42 +12:00
parent 4fc757ece1
commit 477a25ae21

View file

@ -98,6 +98,11 @@ class Pry
# Set to true if the pry-doc extension is loaded.
# @return [Boolean]
attr_accessor :has_pry_doc
# The default editor to use. Defaults to $EDITOR or nano if
# $EDITOR is not defined.
# @return [String]
attr_accessor :editor
end
# Load the rc files given in the `Pry::RC_FILES` array.
@ -216,6 +221,7 @@ class Pry
@should_load_rc = true
@rc_loaded = false
@cli = false
@editor = ENV['EDITOR'] ? ENV['EDITOR'] : "nano"
end
self.reset_defaults