O problema aqui é que $OPTS não é dividido em vários argumentos na linha de comando rsync . Na sintaxe zsh , use:
rsync ${=OPTS} $SRC $DST
(uma alternativa é simular globalmente o comportamento padrão do shell com a opção -o shwordsplit …)
Na página de manual:
One commonly encountered difference [in
zsh] is that variables substituted onto the command line are not split into words. See the description of the shell optionSH_WORD_SPLITin the section 'Parameter Expansion' inzshexpn(1). Inzsh, you can either explicitly request the splitting (e.g.${=foo}) or use an array when you want a variable to expand to more than one word. See the section 'Array Parameters' inzshparam(1).