Fixing your terminal Unix History
htmlhive.com
htmlhive.com
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/fc...
* http://jdebp.uk./FGA/legacy-is-not-a-pejorative.html
Of course, the idea that Unix, which was multi-user from 1st Edition onwards, "could only have one shell open at a time" is nonsense. And I can attest from personal experience that people cottoned on to having two terminals side-by-side before screen came to comp.sources.unix.
Interestingly, the manual page for the TENEX C shell points out that shell variables controlling history should be set in .tcshrc rather than in .login so that they affect the sourcing of $histfile which is done before the sourcing of .login. What it does not also point out is that this results in always setting them in all interactive shells without need to import them from the associated environment variables. If always set in this way, it is largely meaningless to export the shell variables into environment variables visible to other programs in child processes, as the headlined article has one do.
The same can be done with the Z shell, setting the history control shell variables in .zshrc or the $ENV file, the 93 Korn shell and PD Korn shell, setting the history control shell variables in the $ENV file, and the Watanabe shell, setting the history control shell variables in .yashrc or the $ENV file.
history | grep 'keyword' | less
This is usually more effective for me than C-r.
edit: wow, this is GREAT. thank you!
Though, normally I use autojump to traverse around, this is really helpful when you're searching for a folder in somewhere you haven't been before or in a while (autojump uses your history).
20 years later and I meticulously save all of my own history, even command output/terminal transcripts. It has become too rich of information and important for me to callback to, it makes me a more effective worker
Out of curiosity, how much history do you save? And do you sync it between machines (assuming you have more than one)?
for the rest of the ~hundreds of computers I login to in a year I mostly just use default 1,000 maximum lines history of bash. I make no effort to synchronize across machines, it is helpful for me to keep them separate -- which computer it was executed on is also the computer to recall it from.
I have also considered full-time full-screen recording! I just wanted to express that using Linux professionally for 20 some years has turned me around to the opposite of extreme I began with, maybe you do not know that you are missing out on a fantastic "recall" skill :)