Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax: add a LangVariant parameter to Quote #737

Merged
merged 1 commit into from
Oct 1, 2021
Merged

syntax: add a LangVariant parameter to Quote #737

merged 1 commit into from
Oct 1, 2021

Commits on Oct 1, 2021

  1. syntax: add a LangVariant parameter to Quote

    I had missed that $'' expansions are non-POSIX,
    and only implemented by Bash and mksh.
    So, in POSIX mode, we can't quote non-printable characters.
    
    Moreover, fuzzing uncovered that mksh implements \x differently,
    meaning that we require extra logic to follow its rules.
    Keep all the fuzz crashers that we found in the process.
    
    Since we've started having more edge cases that we can't quote,
    start returning an error in the API, with a QuoteError type.
    All it gives right now is a character position and a reason.
    
    Finally, document what versions of Bash and mksh we develop with.
    This matters, because some systems ship with very old versions,
    which can implement slightly different quoting or escaping rules.
    
    While at it, start using quicktest for the tests.
    mvdan committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    1bf11ef View commit details
    Browse the repository at this point in the history