Comment terminal commands to find them later more easily

Published on in Miscellaneous

If you append a comment (like # foo) to a terminal command, you can search by the comment text when using Ctrl+R.

Full example:

curl  # Fred's distribution of Linux

Later you can press Ctrl+R and search for e.g. "Fred" to find the command.

The example is from climagic's YouTube video Using comments in the interactive shell (3:32).