File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ source {{ joinPath .chezmoi.sourceDir "lib" "common" "functions.sh" | quote }}
2525# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
2626# COMPLETION_WAITING_DOTS= " true"
2727
28+ {{ if $ .gui -}}
29+ LOCAL_EDITOR= 'code --wait'
30+ {{ else -}}
31+ LOCAL_EDITOR= 'vim'
32+ {{ end -}}
33+
2834# Preferred editor for local and remote sessions
2935if [[ -n $SSH_CONNECTION ]]; then
3036 export EDITOR= 'vim'
3137else
32- export EDITOR= 'code --wait'
38+ export EDITOR= " $LOCAL_EDITOR "
3339fi
3440
3541export GIT_EDITOR= " $EDITOR"
@@ -70,6 +76,7 @@ brew_add_formula_bin() {
7076 fi
7177}
7278
79+ {{ if eq $ .chezmoi.os " darwin" -}}
7380# Apple Silicon default brew path
7481mbrew_bin= " /opt/homebrew/bin/brew"
7582
@@ -109,11 +116,18 @@ add_ibrew
109116{{ end -}}
110117
111118unset ibrew_bin mbrew_bin ibrew_default_bin mbrew_default_bin
119+ {{ else if $ .brewPrefix -}}
120+ eval " $({{ joinPath $.brewPrefix " bin" " brew" | quote }} shellenv zsh)"
121+ {{ end -}}
112122
123+ {{ if $ .brewPrefix -}}
113124source " $HOMEBREW_PREFIX/share/antigen/antigen.zsh"
114- antigen use oh-my-zsh
115- antigen theme agnoster
116- antigen apply
125+ {{ end -}}
126+ if has_cmd antigen; then
127+ antigen use oh-my-zsh
128+ antigen theme agnoster
129+ antigen apply
130+ fi
117131
118132zstyle ':omz:update' mode auto # update automatically without asking
119133
You can’t perform that action at this time.
0 commit comments