Skip to content

Commit eee1d73

Browse files
committed
fix: correct zsh syntax
1 parent 6cd5e6c commit eee1d73

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

dot_config/zsh/split/plugins.zsh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _zsh_cache="${XDG_CACHE_HOME}/zsh/init"
4444

4545
# zoxide (turbo)
4646
_zinit_setup_zoxide() {
47-
if (($ + commands[zoxide])); then
47+
if (( $+commands[zoxide] )); then
4848
local _zoxide_cache="${XDG_CACHE_HOME}/zsh/init/zoxide.zsh"
4949
[[ -f "$_zoxide_cache" ]] || zoxide init zsh >"$_zoxide_cache"
5050
source "$_zoxide_cache"
@@ -57,7 +57,7 @@ zinit wait"1" lucid light-mode for \
5757

5858
# atuin (turbo) - shell history (load after fzf to override Ctrl+R)
5959
_zinit_setup_atuin() {
60-
if (($ + commands[atuin])); then
60+
if (( $+commands[atuin] )); then
6161
local _atuin_cache="${XDG_CACHE_HOME}/zsh/init/atuin.zsh"
6262
[[ -f "$_atuin_cache" ]] || atuin init zsh --disable-up-arrow >"$_atuin_cache"
6363
source "$_atuin_cache"
@@ -70,7 +70,7 @@ zinit wait"2" lucid light-mode for \
7070

7171
# fzf (turbo)
7272
_zinit_setup_fzf() {
73-
if (($ + commands[fzf])); then
73+
if (( $+commands[fzf] )); then
7474
local _fzf_cache="${XDG_CACHE_HOME}/zsh/init/fzf.zsh"
7575
[[ -f "$_fzf_cache" ]] || fzf --zsh >"$_fzf_cache"
7676
source "$_fzf_cache"
@@ -105,12 +105,12 @@ zinit wait"1" lucid light-mode for \
105105

106106
# direnv (turbo)
107107
_zinit_setup_direnv() {
108-
if (($ + commands[direnv])); then
108+
if (( $+commands[direnv] )); then
109109
local _direnv_cache="${XDG_CACHE_HOME}/zsh/init/direnv.zsh"
110110
[[ -f "$_direnv_cache" ]] || direnv hook zsh >"$_direnv_cache"
111111
source "$_direnv_cache"
112112
fi
113-
}
113+
114114

115115
zinit wait"2" lucid light-mode for \
116116
atload"_zinit_setup_direnv" \
@@ -126,42 +126,42 @@ _zinit_setup_completions() {
126126
local cache_dir="${XDG_CACHE_HOME}/zsh/completions"
127127

128128
# gh (GitHub CLI)
129-
if (($ + commands[gh])); then
129+
if (( $+commands[gh] )); then
130130
local _gh_comp="$cache_dir/_gh"
131131
[[ -f "$_gh_comp" ]] || gh completion -s zsh >"$_gh_comp"
132132
source "$_gh_comp"
133133
fi
134134

135135
# chezmoi
136-
if (($ + commands[chezmoi])); then
136+
if (( $+commands[chezmoi] )); then
137137
local _chezmoi_comp="$cache_dir/_chezmoi"
138138
[[ -f "$_chezmoi_comp" ]] || chezmoi completion zsh >"$_chezmoi_comp"
139139
source "$_chezmoi_comp"
140140
fi
141141

142142
# just
143-
if (($ + commands[just])); then
143+
if (( $+commands[just] )); then
144144
local _just_comp="$cache_dir/_just"
145145
[[ -f "$_just_comp" ]] || just --completions zsh >"$_just_comp"
146146
source "$_just_comp"
147147
fi
148148

149149
# mise
150-
if (($ + commands[mise])); then
150+
if (( $+commands[mise] )); then
151151
local _mise_comp="$cache_dir/_mise"
152152
[[ -f "$_mise_comp" ]] || mise completion zsh >"$_mise_comp"
153153
source "$_mise_comp"
154154
fi
155155

156156
# pnpm
157-
if (($ + commands[pnpm])); then
157+
if (( $+commands[pnpm] )); then
158158
local _pnpm_comp="$cache_dir/_pnpm"
159159
[[ -f "$_pnpm_comp" ]] || pnpm completion zsh >"$_pnpm_comp"
160160
source "$_pnpm_comp"
161161
fi
162162

163163
# kubectl
164-
if (($ + commands[kubectl])); then
164+
if (( $+commands[kubectl] )); then
165165
local _kubectl_comp="$cache_dir/_kubectl"
166166
[[ -f "$_kubectl_comp" ]] || kubectl completion zsh >"$_kubectl_comp"
167167
source "$_kubectl_comp"

0 commit comments

Comments
 (0)