Ionică Bizău Ionică Bizău - 4 years ago 524
Markdown Question

Highlight bash/shell code in markdown

How to highlight the bash/shell commands in markdown files?

For example to highlight
I write:

function () { return "This code is highlighted as Javascript!"}

To highlight HTML code I use

How can we highlight bash/shell commands?

Answer Source

Depends on the markdown rendering engine and the markdown flavour. There is no standard for this. If you mean github flavoured markdown for example, shell should work fine. Aliases are sh, bash or zsh. You can find the list of available syntax lexers here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download