Browse files

--man displays the man page

  • Loading branch information...
1 parent 30b8372 commit 8fa5c6fc99bac29ef3531d08b9332f4384573cf6 @defunkt defunkt committed Dec 12, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 bin/repl
View
6 bin/repl
@@ -23,6 +23,7 @@ Usage: repl [options] command ...
Options:
--help Display this message
--debug Display each command executed
+ --man Display the man page
Bug reports, suggestions, updates:
http://http://github.com/defunkt/repl/issues
@@ -34,6 +35,11 @@ if ARGV.empty? || ARGV.any? { |arg| %w( -h --help -help help ).include?(arg) }
show_help
end
+if ARGV.include? '--man'
+ dir = File.dirname(__FILE__)
+ exec "man #{dir}/../man/repl.1"
+end
+
completion_dir = ENV['REPL_COMPLETION_DIR'] || "~/.repl"
if File.exists?(cdir = File.expand_path(completion_dir))
script = ARGV.detect { |a| a !~ /^-/ }

0 comments on commit 8fa5c6f

Please sign in to comment.