# load zaw sources
setopt local_options extended_glob
local src_dir="${cur_dir}/sources" f
if [[ -d "${src_dir}" ]]; then
for f ("${src_dir}"/^*.zwc) source "${f}"
fi
You really shouldn't use short_loops, they're intended for interactive use (they have drawback – they limit Zsh's parser capability to detect syntax errors). So, to fix, to first lines of zaw.plugin.zsh:
The question is whether zaw want's to change some of Zsh's options. If yes, then better, and overall better, rewrite the loop:
if [[ -d "${src_dir}" ]]; then
for f ("${src_dir}"/^*.zwc) source "${f}"
fi
-->
if [[ -d "${src_dir}" ]]; then
for f in "${src_dir}"/^*.zwc; do
source "${f}"
done
fi
It's about those lines of
zaw.plugin.zsh
:You really shouldn't use short_loops, they're intended for interactive use (they have drawback – they limit Zsh's parser capability to detect syntax errors). So, to fix, to first lines of zaw.plugin.zsh:
There should be added:
The question is whether zaw want's to change some of Zsh's options. If yes, then better, and overall better, rewrite the loop:
and forget about any problems with short_loops.