Fixes#501.
Fixes#616 (the original form; not the form in
test-data/alias-comment1.zsh which is now considered o be #677 (see
previous commit for details)).
Fixes a latent bug in test-data/always2.zsh.
No user-visible effect, and therefore, no changelog entry.
In «a="b=c"; $a», the '=' sign in the expansion of $a is not active.
Therefore, prevent the expansion of $a from being considered an
assignment. Update test expectations accordingly.
We cannot now for sure whether the flag is misspelled or simply unknown to us,
so err on the side of caution. This fixes an unreleased regression. Fixes#658.
Issue #641 was originally filed about this problem, but is left open to track
further enhancements.
$last_alias isn't needed; there's no reason to treat loops of length 2
(alias a=b b=a) differently to loops of length 1 (alias a=a), length 3
(alias a=b b=c c=a), or length N.
The «(( $+seen_alias[$arg] ))» check is redundant as of the last commit:
the enclosing condition ensures that $res is "alias", which implies that
«(( $+seen_alias[$arg] ))» is false.
occurred on zsh-5.0.7 and older but I don't have zsh-5.0.7 handy to test
on.)
Evidently, the issue was due to elision.
This addresses #665.0 and #665.5.
The effect of the bug was that «-:» was considered an option taking an argument
(see the parsing of the associative array in lines 692-693).
As to preventing recurrence, add a warning comment. We _could_ change
the separator from colon to something else, but colon is idiomatic for
this use (see, e.g., passwd(5)), and the problem will be unlikely to
recur if and when we add a third field to the assoc's values. (For
example, jexec(1), chroot(1), and even ssh(1) would benefit from a third
field saying how many positional arguments to skip before the positional
argument that's to be the command word — though in the last two cases,
specifying an "inner" command is optional.)
As of this writing, it seems that the 'type' builtin poisons the commands hash
in a way that breaks AUTO_CD to absolute paths that don't end with a slash.
* i511-bang-pipeline:
main: Fold '!' handling in to the 'case'. No functional change.
Fix indentation. No functional change.
main: Fix highlighting of the ! precommand after array assignments. Add tests.
main: Highlight the ! precommand as an error when not at the start of a pipeline.