Home

Awesome

Search-Directory-History

This is born from my switch to using the Oh-My-Zsh plugin for directory history, per-directory-history. Initially I was satisfied with a simple function to grep through the .directory_history to find historical commands:

function sdh() { find ~/.directory_history/**/history -exec grep "$@" {} + | cut -d';' -f2 | sort | uniq; }

Sometimes I would find that I might want to know the source directory of where I ran those commands, so I could get some additional context of the commands just prior and just after. Context is what keeps me using directory history, and I suspect was a driver for the initial concept. So I've jotted down a few things that I would like a searching tool to do, and started creating search-directory-history.

Features Map

Cobra Command Structure

Commands: verbs, nouns adjectives