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

Parse time options



Hello,
I'm writing a thing to stress test scripts. Basically:

for i in "${STRESS_TEST_OPTIONS[@]}"; do
    setopt "$i"
    print -n "Stress-testing ${fname:t} for option $i "
    zcompile -R "$fname" 2>/dev/null && {
        print "[${mycolors[success]}Success${mycolors[rst]}]"
    } || {
        print "[${mycolors[failure]}Fail${mycolors[rst]}]"
    }
   unsetopt "$i"
done

This seems to work fine with NO_SHORT_LOOPS and IGNORE_BRACES. Is
there one other option that would break zcompile in case of some
forbidden (by the option) syntax? Except maybe for the CSH_* options.
SH_GLOB doesn't seem to be parse-time option, it apparently just
disables '(' ')' at run time, except maybe for situations where e.g.
(N) is done – unsetting SH_GLOB inside script doesn't seem to make (N)
work.

Best regards,
Sebastian Gniazdowski



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