Unlike monolithic frameworks, zshacksorg adheres to four principles:
| Principle | Description | |-----------|-------------| | Modularity | Each hack is a separate file, loaded only if needed. | | Transparency | No automatic updates; user reviews code before sourcing. | | Performance | Avoids subprocesses in prompts; uses Zsh’s built-in features. | | Portability | Works on Zsh ≥5.3 without external tools (awk/sed only when essential). | zshacksorg
setopt NO_BG_NICE # Don't nice background tasks setopt NO_HUP # Don't kill background jobs on shell exit setopt LOCAL_OPTIONS # Allow functions to have local options setopt LOCAL_TRAPS # Allow functions to have local traps | | Portability | Works on Zsh ≥5
Wrap slow commands in functions:
# Bad: Loads npm every time # source /usr/local/share/npm-completionalias ls='ls --color=auto' alias ll='ls -alF' alias la='ls -A' alias ..='cd ..' alias ...='cd ../..' alias grep='grep --color=auto' alias please='sudo $(fc -ln -1)' Unlike monolithic frameworks
[ -f ~/.secrets.zsh ] && source ~/.secrets.zsh