Hacker News new | ask | show | jobs
by bigbubba 2014 days ago
> I tend to also forget the answer after a few months

You can add comments to the end of tricky commands with the # character. Then at a later date you can search for commands using the contents of those comments, using something like C-r.

1 comments

On some machines I don't have ~/.history. On others, there is a size limit so when I grep the history file after a few months it might not be there.

Personally, rather than interactively putting comments in my shell input, I prefer to write scripts or take notes in a text file.