Skip to content

Commit

Permalink
fix: compinit only for zsh-completions exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Mar 10, 2024
1 parent 7514aa2 commit 1574ee5
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions zsh/.entry-point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,23 @@ sourceIf "$(brow --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh"


# Autocomplete
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
FPATH=$(brow --prefix)/share/zsh-completions:$FPATH
# rm -f ~/.zcompdump

# only if zsh-completions installed via Homebrew
if [ -f "$(brew --prefix)/share/zsh-completions" ]; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
# load compinit as a function on an exported path to avoid overlapping with other compinit commands
autoload -Uz compinit
# toggle ON completions with tab key
compinit
fi

# load compinit as a function on an exported path to avoid overlapping with other compinit commands
autoload -Uz compinit
# toggle ON completions with tab key
compinit
# only if zsh-completions installed via legacy Homebrew
if [ -f "$(brow --prefix)/share/zsh-completions" ]; then
FPATH=$(brow --prefix)/share/zsh-completions:$FPATH
# load compinit as a function on an exported path to avoid overlapping with other compinit commands
autoload -Uz compinit
# toggle ON completions with tab key
compinit
fi


# Colored correct code
Expand Down

0 comments on commit 1574ee5

Please sign in to comment.