Skip to content

Commit

Permalink
Add macOS Homebrew sources
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahBird committed Jun 14, 2023
1 parent 636ae4c commit f2e920c
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions dot_config/zsh/dot_zshrc.tmpl
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
# --- Source External Scripts ---

{{ if eq .chezmoi.os "darwin" }}

# Command Not Found (Homebrew - Macos)
HB_CNF_HANDLER="$(brew --repository)/Library/Taps/homebrew/homebrew-command-not-found/handler.sh"
if [ -f "$HB_CNF_HANDLER" ]; then
source "$HB_CNF_HANDLER";
fi

# Autojump
[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh

# Brew Autocomplete
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi

# Autosuggestions
[ -f "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh"

{{ else if eq .chezmoi.os "linux" }}

# Command Not Found (Linux)
[ -f "/etc/zsh_command_not_found" ] && source "/etc/zsh_command_not_found"

# Autosuggestions
[ -f "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"

# Autojump
[ -f "/usr/share/autojump/autojump.zsh" ] && source "/usr/share/autojump/autojump.zsh"

{{ else }}

# Command Not Found (Linux)
[ -f "/etc/zsh_command_not_found" ] && source "/etc/zsh_command_not_found"

{{ end }}

# Autosuggestions
[ -f "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"

# Autojump
[ -f "/usr/share/autojump/autojump.zsh" ] && source "/usr/share/autojump/autojump.zsh"


{{ end }}


# Git prompt
[ -f "${ZDOTDIR}/plugins/git-prompt.zsh" ] && source "${ZDOTDIR}/plugins/git-prompt.zsh"

Expand Down

0 comments on commit f2e920c

Please sign in to comment.