Land #10424, history deduplication on save
parent
6b6191a534
commit
807baacc2c
|
@ -208,10 +208,9 @@ module Shell
|
|||
ret = run_single(line)
|
||||
# don't bother saving lines that couldn't be found as a
|
||||
# command, create the file if it doesn't exist
|
||||
if ret and self.histfile
|
||||
File.open(self.histfile, "a+") { |f|
|
||||
f.puts(line)
|
||||
}
|
||||
if ret && self.histfile && line != @last_line
|
||||
File.open(self.histfile, "a+") { |f| f.puts(line) }
|
||||
@last_line = line
|
||||
end
|
||||
self.stop_count = 0
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue