They don’t need to be ready to go, but ideally:
- natural language searchable
- add a small description
- CLI to search, examine, and copy
- not a <favourite text editor> plugin
- sync with a GitHub repo.
They don’t need to be ready to go, but ideally:
- natural language searchable
- add a small description
- CLI to search, examine, and copy
- not a <favourite text editor> plugin
- sync with a GitHub repo.
Use a flat text in the editor of your choice. Search as needed. Tags work because you can seach them. You delimit each section as a note. I do it like this
---
Next note
---
It seems limited and primative, you don't get any markup or fun stuff. But it's soooo good. There is nothing to break or update. Seach is the method I use most anyway in my other note taking apps.
And you wind up putting everything in there, including commands that you're staging to run. Those staged commands become snippets later.
Eventually I'd like to publish it as a microblog for such snippets ala commandlinefu.com, but priorities and laziness get in the way. :/
Every now and then I start a new sheet, dropping off the stuff I've memorized.
I have txt files for commands I want to remember for each OS I daily use (linuxcmds.txt, windowscmds.txt, maccmds.txt) and split them the same way you said but 5 dashes. Also keep txt files for install/setup notes for each os, links to every program I want to install in fresh installs, etc etc.
Text files work on every single OS/device, the format is stable, it’s easily searchable, easily shareable, and my entire 30 years of notes is measured in megabytes.
Some of them are shared via DropBox and despite the risk of simultaneous edits we had basically no incidents: the simplicity and efficacy justifies it for us.
First, set your HISTSIZE to 1 trillion. Then, tag the relevant commands in the history file with a comment after the command (e.g. sed -n '5,10p' some.log # print selected lines). It gets searchable within the shell, either by the comment or the start of the command. Always at my fingertips.
Shell completions are essential for it, so I had to stumble through writing my own for Fish, but now that it's setup it's quite nice.
Btw if you like fish autocomplete, you might be interested in fig.io.
We've spent a bunch of time making is super easy to add your own completions for scripts or custom CLI tools. :)
My linux only snippet manager: https://github.com/barbuk/snippy
Or a personal wiki, I know people that run their own wikis for just this sort of thing
(That's a web version but I usually access it on the cli or in my editor)
And I just became aware from reading the README that there's an even faster one written in Zig.