From cf5521aee2633502b194594d176b756971d444a5 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Mon, 27 Dec 2021 13:01:59 -0500 Subject: [PATCH] Fixed zsh errors on M1 --- macOS/.config/macOS/AppStore.Brewfile | 1 + zsh/.config/zsh/.zshrc | 31 ++++++++++++++------------- zsh/.config/zsh/zsh-exports | 12 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/macOS/.config/macOS/AppStore.Brewfile b/macOS/.config/macOS/AppStore.Brewfile index 4078751..10c46a4 100644 --- a/macOS/.config/macOS/AppStore.Brewfile +++ b/macOS/.config/macOS/AppStore.Brewfile @@ -1,3 +1,4 @@ mas "pwSafe", id: "520993579" mas "Xcode", id: "497799835" mas "Home Assistant", id: "1099568401" +mas "Vimari", id: "1480933944" diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 35b2141..5739087 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -3,13 +3,6 @@ setopt appendhistory setopt sharehistory setopt incappendhistory -fpath=("$ZDOTDIR/completions" $fpath) -autoload -Uz compinit; compinit -zstyle ':completion:*' menu select -zmodload zsh/complist -# compinit -_comp_options+=(globdots) # Include hidden files. - autoload -U up-line-or-beginning-search autoload -U down-line-or-beginning-search zle -N up-line-or-beginning-search @@ -18,11 +11,6 @@ zle -N down-line-or-beginning-search # Colors autoload -Uz colors && colors -# Homebrew -if [ "$(which brew)" ]; then - eval "$(brew shellenv)" -fi - # Load Useful Functions source "$ZDOTDIR/zsh-functions" @@ -32,14 +20,27 @@ zsh_add_file "zsh-exports" # Plugins zsh_add_plugin "zsh-users/zsh-autosuggestions" zsh_add_plugin "zsh-users/zsh-syntax-highlighting" -#zsh_add_plugin "sindresorhus/pure" + +# Homebrew +if [ "$(which brew)" ]; then + eval "$(brew shellenv)" +fi + +# compinit +fpath=("$ZDOTDIR/completions" $fpath) +autoload -Uz compinit; compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +_comp_options+=(globdots) # Include hidden files. + + # Prompt / managed by brew. (`brew install pure`) #fpath+="$ZDOTDIR/plugins/pure" -autoload -U promptinit; promptinit +autoload -Uz promptinit; promptinit prompt pure # Enable vi mode -bindkey -v +#bindkey -v cat < "$ZDOTDIR/banner" diff --git a/zsh/.config/zsh/zsh-exports b/zsh/.config/zsh/zsh-exports index 3ed6859..3308ea7 100644 --- a/zsh/.config/zsh/zsh-exports +++ b/zsh/.config/zsh/zsh-exports @@ -10,21 +10,19 @@ export SHELL="$(which zsh)" export PATH=~/.bin:$PATH export PATH=~/.local/scripts:$PATH -# Allow git to work on mounted volumes -export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - -# Add homebrew to the path if [ -d /opt/homebrew ]; then export PATH=/opt/homebrew/bin:$PATH export PATH=/opt/homebrew/sbin:$PATH fi +# Allow git to work on mounted volumes +export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + + # zsh-completions installed by homebrew if type brew &>/dev/null; then + FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH FPATH=$(brew --prefix)/share/zsh-completions:$FPATH - - autoload -Uz compinit - compinit fi export EDITOR="nvim"