20090528

bash LAP: project shell history

Once chosen the way of True Laziness, your best friends are Locality and Persistence (gonna write a lot on those guys later). And there's surely no point missing opportunities of making things more local or persistent right here, right now, in your current environment. Yes, yes, the prophecy says that I'm going to unleash the power of mmTerm to save the world from the GUI hell, but why wait doing nothing?

So you may help yourself by defining a sort of bash command:

function hist() {
echo "`fc -ln -1` # `date`" >> .history
}
which allows (and encourages) you to record any significant (previous) command line to a local history log. You may also edit that ./.history yourself, of course, it's your file.

I am using this trick to keep a track of a project's command line activity of mine, and I must say, it's pretty useful while working in the project's directory (executing code generators, linking files, and stuff).

1 comment: