Prevent adding the same command to history
parent
e1e9d6e9ca
commit
fce19cf5b8
|
@ -168,7 +168,8 @@ begin
|
|||
end
|
||||
|
||||
if add_history && line
|
||||
RbReadline.add_history(line)
|
||||
index = ::Readline::HISTORY.length - 1
|
||||
RbReadline.add_history(line) if not (line == ::Readline::HISTORY[index])
|
||||
end
|
||||
|
||||
line.try(:dup)
|
||||
|
|
Loading…
Reference in New Issue