Image missing.
Speeding up my ZSH shell

saikatsg

created: July 20, 2025, 3:51 p.m. | updated: July 21, 2025, 2:50 p.m.

No biggie, my ZSH shell was taking ages to load. When I say ages, more like 5+ seconds every time I opened a new terminal, that sort of thing can add up. Zsh comes with this super handy profiling tool called zprof . DISABLE_AUTO_UPDATE = "true" DISABLE_MAGIC_FUNCTIONS = "true" DISABLE_COMPFIX = "true"The completion system ( compinit ) is zsh’s built-in command completion - it’s what shows possible completions when you hit tab. For comparison here’s a before and after configs:export ZSH = " $HOME /.oh-my-zsh" ZSH_THEME = "spaceship" SPACESHIP_PROMPT_ASYNC = false SPACESHIP_PROMPT_ADD_NEWLINE = "true" SPACESHIP_CHAR_SYMBOL = "⚡" plugins = ( git zsh-syntax-highlighting zsh-autosuggestions ) source $ZSH /oh-my-zsh.sh ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#663399,standout" globalias ( ) { if [ [ $LBUFFER =~ '[a-zA-Z0-9]+$' ] ] ; then zle _expand_alias zle expand-word fi zle self-insert } zle -N globalias bindkey " " globalias bindkey "^[[Z" magic-space bindkey -M isearch " " magic-space .

2 weeks, 1 day ago: Hacker News: Front Page