Skip to content

Latest commit

Β 

History

History
61 lines (44 loc) Β· 2.55 KB

File metadata and controls

61 lines (44 loc) Β· 2.55 KB

πŸš€ Gemini Zsh Copilot: Usage Examples

Use these examples to test your new aliases and explore the capabilities of your AI-powered terminal assistant.


πŸ› οΈ Action Mode (do)

Focuses on execution. Use this when you want to get things done.

File Management

  • do "Convert all .png files in the current directory to .webp"
  • do "Find all files larger than 100MB and list them by size"
  • do "Create a directory structure for a new Python project with src, tests, and docs"

System & Processes

  • do "What process is using port 8080 and how do I kill it?"
  • do "Show me the top 5 memory-consuming processes right now"
  • do "Check my disk usage and show the largest folders in my home directory"

Git Helpers

  • do "Delete all local git branches that have already been merged into main"
  • do "Undo my last git commit but keep the changes staged"
  • do "Create a new branch called 'feature/ui-update' and push it to origin"

πŸ” Diagnostic Mode (explain)

Focuses on troubleshooting. Best used with piped output or error messages.

Debugging Errors

  • ls --fake-flag 2>&1 | explain "Why did this command fail?"
  • cat package.json | explain "Is there anything wrong with this JSON structure?"
  • python3 script.py 2>&1 | explain "Analyze this Traceback and suggest a fix"

Understanding Logs

  • tail -n 20 /var/log/system.log | explain "What are these kernel warnings about?"
  • history | tail -n 10 | explain "What did these last 10 commands actually do?"

πŸŽ“ Knowledge Mode (ask)

Focuses on learning. Use this for general questions or script templates.

Learning Concepts

  • ask "What is the difference between a hard link and a symbolic link in macOS?"
  • ask "Explain the 'Zsh' globbing system and how it differs from Bash"
  • ask "When should I use 'awk' instead of 'sed' for text processing?"

Scripting Templates

  • ask "Give me a robust Zsh script template with error handling and a --help flag"
  • ask "How do I write a loop in Zsh that iterates over all directories in the current folder?"

πŸ’‘ Best Practices for Testing

  1. Always use 2>&1: When piping errors to explain, ensure you include the error stream (e.g., command 2>&1 | explain "...").
  2. Context is Automatic: You don't need to tell the AI which folder you are in or which Git branch is active; it already knows!
  3. Safety First: Always review the Commands panel before typing y to execute. You can also run cat review_and_run.sh to see the generated script again.

Generated: Saturday, February 28, 2026