Ten shell habits that saved me hours

May 2026

  1. Use set -euo pipefail in scripts.
  2. Keep a ~/bin on your PATH.
  3. Learn Ctrl-R history search.
  4. Prefer rg over grep for code.
  5. Use tmux for long jobs.
  6. Alias common git commands.
  7. Quote your variables.
  8. Use trap for cleanup.
  9. Write a --dry-run flag.
  10. Read the man page first.