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

Re: NOMATCH errors



On Jan 5, 10:35pm, Anthony Heading wrote:
}
} echo hello
} echo =hello =hello
} echo "is there anybody in there?"
} 
} doesn't get past:
} hello
} hello:2: hello not found
} 
} Interestingly the docs perhaps arguably seem to imply differently:
}    Fatal errors found in non-interactive shells include:
}    [...]
}    o    File generation failures where not caused by NO_MATCH or similar
}    options

This particular bit of doc is out of date.  Which is to say, either the
doc should have been changed or a bug was introduced.

This appears to date from workers/30789 which introduced the option
CONTINUE_ON_ERROR.  This changed default startup-script behavior from
blowing right past all sorts of syntax problems, to aborting on those
errors.  Setting the option restores the old behavior.

Unfortunately NO_MATCH errors got swept into the bucket along with all
the other startup-time errors, so there's now no way other than using
an "eval" wrapper or an "always" block to safely skip NO_MATCH errors
without also skipping more serious errors like broken loop control
syntax.

So ... either we need to undo that side-effect of CONTINUE_ON_ERROR or
we need to update the documentation quoted above.



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