obsidian-execute-code icon indicating copy to clipboard operation
obsidian-execute-code copied to clipboard

[FR] `console` codeblocks

Open chlohal opened this issue 2 years ago • 3 comments

On GitHub and many other services, you can use a code-block with the console language to represent a console session. For example:

chlohal@DESKTOP2FA3C:~$ echo 'hi'

It would be a great quality-of-life feature if we could

  1. Parse console blocks
  2. Recognize command lines (with a $)
  3. When running the block, execute the command in the proper directory.

This may have security concerns, but IMO the ease-of-use provided is justifiable. Someone could easily cd in a bash block, but this is easier to write and scans better.

chlohal avatar Jan 20 '23 17:01 chlohal