Bash/Shell Cursor Rules
April 15, 2026
Bash/Shell Cursor Rules
Code Style
- 2 spaces indentation
- snake_case for functions/variables
- .sh extension for scripts
- 100 char line limit
Best Practices
- Use set -euo pipefail at top
- Always quote variables
- Use [[ ]] for tests
- Use local for function variables
- Use traps for cleanup
- Log to stderr
AI Instructions
- Include shebang (#!/usr/bin/env bash)
- Add error handling and logging
- Include usage/help function
- Add example usage in comments
Related Articles
Programming Languages Supported by Cursor Rules
Explore programming languages supported by Cursor Rules with language-specific guidelines, best practices, and examples for effective AI-assisted coding.
Frontend Framework Cursor Rules for Modern Web Development
Master cursor rules for React, Vue, Angular, Next.js, Svelte, Qwik, and Astro. Framework-specific best practices for efficient web development workflows.
Rust Cursor Rules: AI-Powered Development Best Practices
Cursor rules for Rust development enforcing ownership patterns, type safety, async/await practices, and clean code principles with AI assistance for production-ready code.