fixed amend-line to no longer add unnecessary new lines

This commit is contained in:
John Mair 2011-05-25 02:35:13 +12:00
parent 5e11ff46a8
commit 040886284d
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ class Pry
command "amend-line", "Amend the previous line of input. Aliases: %", :interpolate => false do |replacement_line|
replacement_line = "" if !replacement_line
input_array = opts[:eval_string].each_line.to_a[0..-2] + [opts[:arg_string] + "\n"]
opts[:eval_string].replace input_array.join("\n")
opts[:eval_string].replace input_array.join
end
alias_command "%", "amend-line", ""