logoalt Hacker News

Kubuxuyesterday at 10:42 AM0 repliesview on HN

I use SQLite history to have context aware line suggestion in my shell. So the command that gets ghost displayed (and can be expanded with right arrow) depends on the current working directory, its parents and recency. This is fast enough using SQLite to just dump all commands into it and query on each typed letter.

The DB is at this point 10years old. I use it to evaluate my work habits and patterns. More recently I have started transitioning to a different shell and I used it to move only the functions and aliases I still use, instead of the full collection.