If you’re going to do this then have an escape hatch for commands you don’t want memorised https://github.com/craigjperry2/dotfiles/blob/aa77ddcbde63bf...
If you’re going to do this then have an escape hatch for commands you don’t want memorised https://github.com/craigjperry2/dotfiles/blob/aa77ddcbde63bf...
$ find . -iname 'package.json' -exec jq .version {} \; # get npm module version numbers for all packages
now when you search history you can do so with plain text: $ history | grep 'npm module version'
you could of course take this further by 'tagging' commands if you wish and then grep for that tag later to return longer cheatsheets# Edit
I sometimes add comments to commands via `# This‘ll do this and that` so that I can find the command by those keywords in the bash history.
Hope there's a project out there that helps parse, rank, or do something with a file like this. There must be interesting information.
Is there something you are doing so the different sessions don't clobber each other?
Its sad how I install all those things, forget about them the next day and cd/ls/vi like a caveman.
The problem is much deeper than you think, OP...
Sounds like I should be focusing on "one new workflow thing a week" and make it a daily habit to practice, or something.
I seem to be using "zoxide" (ie "z prj") to jump to one of my projects after opening a terminal, and mostly stay on that folder for a few days.
Some other things I'll do in Finder, etc.
1. 10,000 isn't 'huuuuge' for long lived workstations, but 100k ought to be good for a while (bash, but not zsh, allows disabling truncation entirely with SAVEHIST=-1)
2. if using bash, make sure that this init stuff is sourced by both login and non-login shells (from ~/.bash_profile vs ~/.bashrc respectively)
3. specifying a non-default HISTFILE near your SAVEHIST (as shown in that zshrc link) can go a long way toward avoiding an improperly-configured shell truncating your huge history log, eg point 2