3 ms·
I'm curious to hear what people's usecases are for retaining long shell history. For myself, I never really use it beyond the current work day (up arrow)
by brundolf 3y ago
I'm curious to hear what people's usecases are for retaining long shell history. For myself, I never really use it beyond the current work day (up arrow)
- zem 3y agofor work, there are a lot of commands with complex invocations that I do not use regularly enough to bother remembering all the flags. it is really useful to just grep through my full shell history to find all the times I ran that command and just copy/paste the relevant one.
- stoniejohnson 3y agoYep, I do `history | grep "<whatever>"` all the time.. I should probably make it a function now that I think about it.
- _kblcuk_ 3y agoMost of the shells have built-in recursive search, why not just use that? `Ctrl + R` in bash / fish / zsh at least.
- zem 3y agoi usually want to just see all the options at once and pick the one i want, rather than searching through them one by one
- zem 3y agoi called my function `fh` for "full history"
- brundolf 3y agoIt may just be that I don't use the shell very much compared with other people, mostly for building and running local code
- Ntrails 3y agoI end up manually curating skeleton command lines in a text file - partly because I've never had functional full badh history
- zem 3y agoi shared my full-history script on here a while back and someone pointed me to atuin :) https://news.ycombinator.com/item?id=32477431 https://news.ycombinator.com/item?id=32477431
- nox101 3y agoI definitely refer to months old command lines. I work on 10-15 projects ~2 are every day projects, ~6 every week projects, the rest every month or 2. I often recall commands I used on those month ago projects. I often remember the first few letters and press up arrow or I Ctrl-R for a part of the command-line I remember. I rarely have to dig out the docs to remember how to full type the line.