vastunity.blogg.se

Macdown shell
Macdown shell















When looking at the Markdown source above, pay particular attention to how specific code-fences are being used.

#Macdown shell code

The alias ~~~=":<<'~~~zsh’" ensures that when a fenced code block ends, it begins discarding content again until the next code block because every block that began with :<<'~~~zsh’ must end with ~~~. It then resumes execution with the content of that code block. The result is that when the shell encounters the expression :<<'~~~zsh’ it begins discarding every line that follows until it encounters a fenced code block that begins with ~~~zsh. Surrounding it with single quotes ensures that the shell does no substitution or command execution on the Here document content.

  • ’~~~zsh’ is the delimiting identifier being used to indicate the end of the current Here document.
  • << indicates a Here document - passing all of the lines that follow it into the standard input of that command until it encounters its delimiting identifier on its own line.
  • : is a built-in shell command that ignores all of its arguments (and standard input) and simply returns true.
  • The key expression at the top of this document is :<<'~~~zsh’.

    macdown shell macdown shell

    How it worksĪny ~~~zsh fenced code blocks are considered to be part of the shell script, and the rest of the Markdown will be ignored. That article can be run as shells script to run the SQlite tests it describes. ] & command bat -P -l sql -theme=Nord -style= "grid,numbers " <<< $















    Macdown shell