Shell-specific code blocks

I find myself creating a lot of cards that include specific shell commands to execute. A common convention, which I adhere to, is to use $ to denote a command to be run as non-root and # for a command to be issued as root.

I generally set the code type to shell or bash in these instances, however, using these symbols affects the rendering. It would be very useful to have special code types to render such items and specially include the left indicator. For example, the code type shell could automatically prepend a styled $ while shell-root could specifically prepend a styled #. Or, just have the existing shell, bash, etc. code types ignore those characters from styling when they are the first on a line.

1 Like

Hi Michael,

Interesting idea! Making code-blocks be a bit smarter has been mentioned as a way of implementing callouts as well. We will see what we can do.

To gauge interest if anyone else would like this behaviour please like Michael’s post above or add your thoughts down below.