3 ms·
I keep track of short snippets for languages, applications, etc, using a simple CLI tool. I call it quickref, and the command is `qr`. Usage: $ qr show a
by alanbernstein 9y ago
I keep track of short snippets for languages, applications, etc, using a simple CLI tool. I call it quickref, and the command is `qr`. Usage:
$ qr
show available quickref files (in directory $QR)
$ qr topic
show all lines from $QR/topic.txt
a "topic" can be anything, but generally something like a language (py),
application (blender), package (django), command (git). also things like audio,
pdf manipulation, CLI image editing.
$ qr topic pattern
show all lines from topic.txt that match regex pattern
$ qr topic term1 term2 ...
show all lines from topic.txt that match all terms
$ qr add topic "line with spaces"
append "line with spaces" to topic.txt
$ qr edit [topic1 [topic2 ...]]
open specified topics with $EDITOR
- adt2bt 9y agoCould you share the tool? I'm very interested in using it myself.
- alanbernstein 9y agoDefinitely, give me a couple days to clean it up.
- dkns 9y agoLooks similar to terminal velocity: https://www.seanh.cc/terminal_velocity/ https://www.seanh.cc/terminal_velocity/
- alanbernstein 9y agoYea, had I known about this a couple years ago I might have just gone with it instead.
- alanbernstein 9y agoAvailable here: https://github.com/alanbernstein/quickref https://github.com/alanbernstein/quickref - sorry for the delay!
- soheilpro 9y agoI too have written a similar tool called mann (https://github.com/soheilpro/mann https://github.com/soheilpro/mann) for this purpose.