Code block with fish shell commands - answered

(I already found an answer but not on this forum, so sharing this for others to find)

I use the fish shell instead of bash/zsh and I often want to write code snippets for it. But the syntax highlighter in Obsidian (Prism) does not support fish shell syntax.

But then I discovered I can just use shell as the language name for the code block, which gives me good enough results. I can imagine this will stop working when you write more complicated fish code, but good enough for now.

So, example:

(I can’t show this as text because this forum also uses Markdown with code blocks.)

Hehe, you can you just keep on adding more backticks (or tilde’s):

history clear
# Does something useful

To show this block, I’ve got 5 on the outer layer, to be able to show the 4 and 3 you would need to write. :smiley:

The only downside is that syntax coloring goes down the drain pretty fast

1 Like