Shell in Markdown
For a long time,
commandline as the name for the syntax of code fences in markdown whenever I’ve wanted to denote a shell command or session.
I’ve now realized that I’ve been using the wrong name, and also that there are two separate scenarios to keep in mind:
The first scenario is one-off commands, which should use the syntax
This would be showing something you’d enter directly at the command line.
brew install git
I leave out the command prompt, because it’s implied by the context that the line is to be entered in a command line. Also, it helps with copy-paste.
The other scenario is showing a shell session,
which typically shows the command prompt, an entered command, and the response to the command.
In this instance I’d use the
$ git st ?? content/til/markdown-shell.md