Dev.to
7/1/2026

What's Actually in My .zshrc (and Why)
Short summary
Shell defaults like interactive confirmations and fancy prompts actively break non-interactive processes such as Claude Code and CI workflows. This post demonstrates how to detect agent mode and conditionally disable friction using force flags, plain prompts, and disabled beeps. Also covers secure credential management via macOS Keychain instead of plaintext dotfiles, plus practical shortcuts like the issue() function for rapid GitHub integration.
- •Detect agent mode (npm_config_yes, CI environment, non-interactive shell) and conditionally adjust shell behavior to prevent hangs
- •Disable beeps, confirmations, fancy prompts; set force flags on destructive commands (rm, cp, mv) to prevent agent hangs
- •Use macOS Keychain for secure credential storage instead of plaintext dotfiles; featured tools: atuin for searchable history, starship for smart prompts
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



