這樣的報(bào)錯(cuò)直接在判斷里面加個(gè)-n
if [[ -n $_comp_path(#qNmh-20) ]]; then
unknown file attribute
這是zsh 數(shù)組賦值操作錯(cuò)誤
改成下面
#修改前
typeset -A _download_helpers=(
aria2c 'aria2c --continue --remote-time --max-tries=0'
curl 'curl --continue-at - --location --progress-bar --remote-name --remote-time'
wget 'wget --continue --progress=bar --timestamping'
)
#修改后
declare _download_helpers
_download_helpers=(
aria2c 'aria2c --continue --remote-time --max-tries=0'
curl 'curl --continue-at - --location --progress-bar --remote-name --remote-time'
wget 'wget --continue --progress=bar --timestamping'
)