2 ms·
Exactly, I just wrote a blog post about how I do that, basically with shell scripts in the repo with lots of small functions. They basically form an annotated
by chubot 6y ago
Exactly, I just wrote a blog post about how I do that, basically with shell scripts in the repo with lots of small functions. They basically form an annotated log of what I did, so I never have to remember long commands.
I can't remember long commands so I always write them down.
Examples of using a JSON API, using a C++ tool uftrace, and hacking on Kernighan's awk:
Shell Scripts Are Executable Documentation http://www.oilshell.org/blog/2021/01/shell-doc.html http://www.oilshell.org/blog/2021/01/shell-doc.html
Admittely there are a lot of people who don't seem to like reading shell scripts as docs. But you don't really have to read the code -- you just read the function names.
I also added doc comments to Oil, like this:
deploy() {
### doc comment
cp foo bar
}
which you can access with the 'pp' builtin. So eventually those strings could be exposed to autocomplete, etc.
http://www.oilshell.org/blog/2020/11/more-syntax.html http://www.oilshell.org/blog/2020/11/more-syntax.html