Instruction file imported from AndrewLvov/fin_advisor (
.cursor/rules/13_shell_snippets_zsh.mdc). Copyright stays with the author.
Title: Shell snippets (Zsh-safe copy/paste)
Summary
- Use Zsh-safe shell snippets. Lines beginning with
#must NOT appear inside copy-pastable code blocks. - Inline trailing comments after a command (e.g.,
cmd args # note) are allowed. - Place explanations outside code blocks; avoid comment-only lines in shell code blocks.
Rules
- Do not include lines that start with
#inside shell code blocks. These cause errors in Zsh when copy-pasted. - Inline trailing comments after a command are OK:
git status # check working tree. - Move any explanatory notes above or below the code block instead of inside it as comment-only lines.
- Prefer chaining commands with
&&or using newlines—without leading#lines.
Examples
Bad (comment-only line inside code):
# Install dependencies
pnpm install
Good (note outside the code): Install dependencies:
pnpm install
Good (inline trailing comment):
git status # check working tree
Good (multiple commands without comment-only lines):
pnpm install && pnpm run build && pnpm run preview