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