Hacker News new | ask | show | jobs
by DEinspanjer 3938 days ago
Do you have any links to resources you used to build it or better yet a link to your implementation?

I've been pretty happy with my bash history solution, but thinking about the return value, one big thing I think would be handy would be to have a default filter for searches that removes commands that returned an error code. They might be handy to see every once in a while, but for the most part, I wouldn't want to re-run one of them.

1 comments

http://pastebin.com/zJkPW79C

I use bash-preexec [1] to hook on the even just before executing a command. I'm kind of nervous if my string quoting is safe though.

[1] https://github.com/rcaloras/bash-preexec