Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: surprise with echo



On Dec 19, 2014, at 12:19 AM, Kurtis Rader <krader@xxxxxxxxxxxxx> wrote:

> You apparently missed my point that script was meant to be run by a Plan 9 rc shell. See the "#!/usr/bin/rc" at the top. It was meant to exhibit the behavior of the shell the zsh RC_EXPAND_PARAM option is meant to emulate.

I did not miss your point, but I did misunderstand some of the rc-specific syntax you used, and I think your test examples conflated many of the issues being discussed.

However, simpler test cases do support your position.

% cat >/private/tmp/x <<'EOF'
heredoc> foo=()
heredoc> echo 1: aaa^$foo^bbb
heredoc> 
heredoc> foo=('')
heredoc> echo 2: aaa^$foo^bbb
heredoc> 
heredoc> foo=(1 2)
heredoc> echo 3: aaa^$foo^bbb
heredoc> EOF
% rc /private/tmp/x
1: aaabbb
2: aaabbb
3: aaa1bbb aaa2bbb
%

vq


Messages sorted by: Reverse Date, Date, Thread, Author