From 993c77fa168916e2dc7ed0627550b65ff93fd811 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sun, 5 May 2013 00:54:32 +0200 Subject: [PATCH] 'motion ri' now honors PAGER env variable --- lib/motion/project/command/ri.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/command/ri.rb b/lib/motion/project/command/ri.rb index 9588a564..546ecbb8 100644 --- a/lib/motion/project/command/ri.rb +++ b/lib/motion/project/command/ri.rb @@ -30,8 +30,13 @@ module Motion; module Project if args.size <= 0 die "Usage: motion ri " end - - system("/Library/RubyMotion/lib/yard/bin/yri --db /Library/RubyMotion/doc/yardoc #{args[0]}") + + line = "/Library/RubyMotion/lib/yard/bin/yri --db /Library/RubyMotion/doc/yardoc " + if pager = ENV['PAGER'] + line << "-p #{pager} " + end + line << "#{args[0]}" + system(line) end end end; end