mirror of
https://github.com/vbatts/persistent-shell-history.git
synced 2024-11-24 00:15:40 +00:00
adding db reorganize() to keep the size down
This commit is contained in:
parent
1cecbe0c08
commit
d8d4e8ba0a
1 changed files with 5 additions and 2 deletions
|
@ -67,11 +67,14 @@ exit(0) if options[:migrate]
|
|||
bh = Persistent::Shell::BinaryHistoryStore.new(bh_options)
|
||||
|
||||
# load the new bash_history into the database
|
||||
bh.load() unless (options[:inspect] or options[:find] or options[:list])
|
||||
unless (options[:inspect] or options[:find] or options[:list])
|
||||
bh.load()
|
||||
bh.db.reorganize()
|
||||
end
|
||||
|
||||
if options[:inspect]
|
||||
p bh
|
||||
p "storing #{bh.keys.count} commands"
|
||||
#p "storing #{bh.keys.count} commands"
|
||||
end
|
||||
if options[:find]
|
||||
bh.find(options[:find]).sort_by {|x| x[:time] }.each do |val|
|
||||
|
|
Loading…
Reference in a new issue