zsh-syntax-highlighting: zsh crash when reload `~/.zshrc`

  1. Open the Terminal
  2. Run source ~/.zshrc
  3. Process completed

screen shot 2016-04-01 at 16 16 12

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 25 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I added this to my .zshrc

if [[ $ZSH_EVAL_CONTEXT == 'file' ]]; then
	printf "autosuggestions loaded"
  source "./.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
  source "./.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
fi

This fixed my terminal from crashing.

this if statement will only run when a new window is open and wont get triggered

I have the same problem!

Step to produce:

~% zsh
~% source ~/.zshrc
~% [1]    26129 segmentation fault  zsh

My .zshrc:

source $HOME/.antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply

My environment:

~% zsh --version
zsh 5.2 (x86_64-apple-darwin14.5.0)

~%  sw_vers        
ProductName:    Mac OS X
ProductVersion: 10.10.5
BuildVersion:   14F1713

Diagnosis and proposed fixes in #294.