开发者

How do I save my command snippets for quick access from the commandline?

开发者 https://www.devze.com 2023-02-01 14:14 出处:网络
I have a huge file with all the commands I use on and off the commandline. This file is getting harder to open and navigate as its size gets larger. I am looking for a commandline utility that makes t

I have a huge file with all the commands I use on and off the commandline. This file is getting harder to open and navigate as its size gets larger. I am looking for a commandline utility that makes this process easier. I found this gem, which does something similar to what I want, but it's terrible with开发者_JAVA技巧 long lines of code with multiple quotation marks.

What does everyone use to keep your code snippets and easily access it from your terminal?


I keep a similar file myself. This example isn't directly useful with your file. However when I find that I need to run a particular command I recently used, without looking it up again, I run a grep on history.

For example:

history | grep "svn co"

0

精彩评论

暂无评论...
验证码 换一张
取 消