Back to articles
cmdlib: Save, Search and Run Terminal Commands with Descriptions (Better Than CTRL+R)
NewsTools

cmdlib: Save, Search and Run Terminal Commands with Descriptions (Better Than CTRL+R)

via Dev.toThompson Olufemi

If you use the terminal a lot, you probably run into this problem. You ran a useful command some time ago. Maybe last week or last month. Now you need it again but you cannot remember the exact command. So you press CTRL+R and start searching through your shell history. Sometimes you find it quickly. Many times you don't. Or you remember what the command does but you do not remember the exact text of the command. This happens to me all the time. For example I might remember something like "that command that deletes docker images" or "that command that finds large files in a folder" But when I search with CTRL+R it does not help because I do not remember the exact command text. So I built a small tool for myself called cmdlib . cmdlib is a very simple idea. It lets you save commands with a description and later search using that description. For example you can write a command like : docker image prune -a And then add a meaninful description : delete unused docker image Later when you f

Continue reading on Dev.to

Opens in a new tab

Read Full Article
5 views

Related Articles