Prevent adding the same command to history

GSoC/Meterpreter_Web_Console
Auxilus 2018-08-05 22:33:00 +05:30 committed by GitHub
parent e1e9d6e9ca
commit fce19cf5b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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)