Showing a command prompt character can be useful for users to aid recognition and build familiarity that “yes, I am on the right track”.
Care should be taken to avoid the command prompt character being accidentally selected if the code is copied, as pasting the command prompt as part of the command will cause an error.
States & Behaviours
A character in the Vanilla monospace font, ahead of the code snippet, but not selected on;
- Triple-click (line select)
- Command / Control - A
The character itself can be specified in the markdown/schema for the example, but the code author can optionally leave it blank and no command prompt will be shown.
Each code example (code “version” - as controlled by the version switcher) can optionally have its own command prompt (for example “
>” on Windows).