Closed wagoodman closed 8 years ago
Thanks @wagoodman, this was definitely an issue.
I've fixed this in version 0.1.1
. You can upgrade via sudo pip install recent --upgrade
.
As you mentioned it is due to the history 1
not updating when an empty command is run. This makes things a bit tricky and unfortunately there are no other good ways to get what was last entered from bash.
I fixed this by recording the sequence number that is returned from history 1
. This had a throw-on effect that I now needed to manage sequences and sessions so that multiple bash terminals wouldn't interfere with each other. I've now created a separate sessions
table in the database that records:
history
The cool thing is that this is all now captured in the database.
I've started upgrading the recent
command tool as well. You can now query dates and working directories so you can type stuff like recent -w . -d 2016 git
to get git commands run in the current folder over 2016. Would appreciate any feedback you have.
Great tool, btw! I'm having a small issue with it: When you hit on an empty prompt, a new entry is added to the
recent.db
that reflects the last full command run. For instance:Now hit a few times and see what recent says:
This shows the last command (in this case recent) correctly being logged at 12:46:12, but incorrectly logged when on 12:47:33 and 12:47:34 (twice each).
I suspect a similar trick as listed here may help.