Prompt
When documenting code examples and shell commands in project documentation, follow these formatting standards to ensure consistency and clarity:
- Use appropriate language specifiers:
- Use
shellrather thanbashfor shell commands that work in any shell environment -
cargo install --locked cargo-docs-rs
- Use
- Separate commands from their output:
- Place commands and their outputs in separate code blocks
- Label output blocks with
textto distinguish them from executable commands -
cd tokio cargo fuzz listfuzz_linked_list
- Include safety flags in installation commands:
- Always use
--lockedwith installation commands to prevent dependency issues -
cargo install --locked cargo-spellcheck
- Always use
- Format spellcheck exceptions properly:
- Enclose code-related terms in backticks when they’re flagged by spellcheck
- Add non-code terms to the dictionary file (spellcheck.dic)
- Remember to update the word count in the dictionary file header
These practices improve documentation readability and help users distinguish between what they should type and what they should expect to see as output.