From 60c8435e1f775ff27e81cac5a84a28f7d0f6319a Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 10 Jan 2004 17:10:19 +0000 Subject: ri now accepts options via RI environment variable git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/rdoc/ri/ri_options.rb | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3ebfb3c89a..c88fd64d43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jan 11 02:07:47 2004 Dave Thomas + + * lib/rdoc/ri/ri_options.rb (RI::Options::OptionList::OptionList): + Also accept command line options via the 'RI' environment variable. + Sat Jan 10 23:01:41 2004 Nobuyoshi Nakada * configure.in (LIBPATHFLAG, RPATHFLAG): enclose paths with single diff --git a/lib/rdoc/ri/ri_options.rb b/lib/rdoc/ri/ri_options.rb index c62335c147..0e720a9c64 100644 --- a/lib/rdoc/ri/ri_options.rb +++ b/lib/rdoc/ri/ri_options.rb @@ -150,6 +150,7 @@ module RI end puts end + puts "Options may also be passed in the 'RI' environment varaible" exit 0 end end @@ -164,6 +165,11 @@ module RI @formatter = RI::TextFormatter.for("plain") @list_classes = false + old_argv = ARGV.dup + if ENV["RI"] + ARGV.replace(ENV["RI"].split.concat(ARGV)) + end + begin go = GetoptLong.new(*OptionList.options) -- cgit v1.2.3