Move OMZ init to help speed up shell

compinit took the most time, which we were duplicating. Now we let OMZ
handle it.
This commit is contained in:
Jake Howard 2023-07-28 14:05:15 +01:00
parent 9c1ad2bf05
commit f30441321b
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -12,18 +12,18 @@ plugins=(
export COMPLETION_WAITING_DOTS="true" export COMPLETION_WAITING_DOTS="true"
# Enable oh-my-zsh
source $ZSH/oh-my-zsh.sh
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
export fpath=(/usr/share/zsh/site-functions $fpath) export fpath=(/usr/share/zsh/site-functions $fpath)
autoload -U compinit && rm -f ~/.zcompdump && compinit
autoload -Uz colors && colors autoload -Uz colors && colors
local ret_status="%(?:%{$fg_bold[green]%}λ :%{$fg_bold[red]%}λ )" local ret_status="%(?:%{$fg_bold[green]%}λ :%{$fg_bold[red]%}λ )"
export PROMPT="${ret_status} %{$fg_bold[green]%}%n@%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%}$ " export PROMPT="${ret_status} %{$fg_bold[green]%}%n@%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%}$ "
# Enable oh-my-zsh
source $ZSH/oh-my-zsh.sh
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
alias src="source {{ home }}/.zshrc && tmux source {{ home }}/.tmux.conf" alias src="source {{ home }}/.zshrc && tmux source {{ home }}/.tmux.conf"