'motion ri' now honors PAGER env variable

This commit is contained in:
Laurent Sansonetti
2013-05-05 00:54:32 +02:00
parent 1bc9c2a945
commit 993c77fa16

View File

@@ -30,8 +30,13 @@ module Motion; module Project
if args.size <= 0
die "Usage: motion ri <API-name>"
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