by kbd · 5y ago · 0 comments
It has always been a frustration that the current working directory metadata isn't saved along with history entries, so you can never really reconstruct what was run.
Edit: I should really try out https://github.com/larkery/zsh-histdb. There's no reason a modern system's history shouldn't store start and finish timestamps, return code, current working directory, etc.
It is if you use fish shell.
It's not scoped by directory though, but I'm not sure I'd personally need that feature.
(but it won't happen, these days it's crazy rare to "dig in" in a dazzlingly customized environment, we'd rather tweak our skills to work on the widest range of default environments. Certainly not the best conditions for innovation)
Speak for yourself. The time I spend working locally is vastly more than I spend ssh-ing into somewhere vanilla so it's worth making my environment as comfortable and full-featured as possible.
Edit:
> I hardly ever use cd… to get a history [with] path references
That’s one way of solving the problem, but then you miss out on great tools like direnv… and relative paths.
And git branch if applicable.
https://github.com/cantino/mcfly
https://github.com/ellie/atuin
https://loshadki.app/shellhistory/
Agreed. Wild that's not built in at this point.