4 ms·
This is similar to the approach I take in my markup language: https://github.com/smasher164/mexdown https://github.com/smasher164/mexdown. Pipe the body of a co
by smasher164 5y ago
This is similar to the approach I take in my markup language: https://github.com/smasher164/mexdown https://github.com/smasher164/mexdown. Pipe the body of a code block to the command's stdin, and replace the code block with its output.
- khalidx 5y agoInteresting, going to check this out today. I built something in a similar spirit to your comment and this larger thread, albeit a bit simplistic. Lets you document and write your bash scripts in a markdown file, then you can run the blocks. It figures out what arguments you expect in a block and turns them into CLI flags. https://github.com/khalidx/runbook https://github.com/khalidx/runbook Not sure how useful it is but I use it to maintain a collection of documented bash scripts.