Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I have a shell history with the limit of 1M lines, and shells append to it, not overwrite it on exit.

I never have to review (except occasional grep something ~/.zsh_history), but I find myself typing Ctrl-R to find commands in history all the time.



view as:

Same for me. Windows PowerShell now conveniently comes with PSReadLine, that enables to just hit on CTRL+R, write some keywords (and maybe after few more CTRL+R hits), and that historical command pops out whenever I need it.

Even better, newer versions support predictions [0] - which, whenever you type any text, it immediately lists multiple commands where it finds a match.

Of course, that addresses only myself, but not whoever touches the project. As well, I may not know in what context that command was ran. So I appreciate some suggestions here that guide toward making scripts and providing useful info in README.

[0] https://youtu.be/VT2L1SXFq9U?t=2594


Use Invoke-Build as portal to other scripts in the repo. Document scripts using README.md in their own folder.

Then users of your project can type `ib ?` to get the list of available scripts and ib itself will setup context of their execution as needed.


There's also nifty Windows application called Ditto - basically a searchable history of the system clipboard. Any time there's any complex command or a snippet, I intuitively just highlight it (in Putty) or CTRL+C it

Log in to our Postgres? that's `psql` something something. CTRL + ALT + V, type psql - there it is

PGPASSWORD=pass1234 psql -h our-database-dev.abcdefg.us-east-1.rds.amazonaws.com -U acme maindb

Press Enter to automatically enter it in currently active window


I haven't had it long enough to have an opinion about it's virtue yet but I found this interesting tool recently...

https://loshadki.app/shellhistory/


Legal | privacy