Skip to content

mflag: strip quotes in certain forms from flag values#6147

Merged
vieux merged 2 commits intomoby:masterfrom
cyphar:6142-mflag-strip-quotes-long-equal-form
Jun 2, 2014
Merged

mflag: strip quotes in certain forms from flag values#6147
vieux merged 2 commits intomoby:masterfrom
cyphar:6142-mflag-strip-quotes-long-equal-form

Conversation

@cyphar
Copy link
Contributor

@cyphar cyphar commented Jun 2, 2014

In the form -flag="val" or --flag="val", the value is quoted when parsed (while in conventional libraries such as getopt, these types of flags are stripped of quotes). This patchset fixed this, and adds some unit tests to make sure that they work.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai [email protected] (github: cyphar)

Closes #6142
/cc @vieux

cyphar added 2 commits June 2, 2014 15:25
This patch improves the mflag package to ensure that things arguments
to mflag such as `-flag="var"` or `-flag='var'` have the quotes
stripped from the value (to mirror the getopt functionality for similar
flags).

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <[email protected]> (github: cyphar)
This patch adds some tests to ensure that quoted flags are properly
handled by the mflag package.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <[email protected]> (github: cyphar)
@vieux
Copy link
Contributor

vieux commented Jun 2, 2014

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-name does not strip quotes

2 participants