added extra inline documentation for hist command

This commit is contained in:
John Mair 2011-05-05 00:29:31 +12:00
parent f43e51dac3
commit a8f8a7cb0a
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ class Pry
opts[:eval_string].clear
end
command "hist", "Show and replay Readline history. Type `hist --help` for more info." do |*args|
command "hist", "Show and replay Readline history. When given no args history is displayed.\nType `hist --help` for more info." do |*args|
hist_array = Readline::HISTORY.to_a
if args.empty?
@ -18,7 +18,7 @@ class Pry
end
opts = Slop.parse(args) do |opt|
opt.banner "Usage: hist [--replay START..END]\nView and replay history\ne.g hist --replay 2..8"
opt.banner "Usage: hist [--replay START..END]\nView and replay history\nWhen given no args, history is displayed.\ne.g hist --replay 2..8"
opt.on :r, :replay, 'The line (or range of lines) to replay.', true, :as => Range
opt.on :h, :help, 'Show this message.', :tail => true do
output.puts opt.help