-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support terminated options like
find -exec
Enable option to receive arguments until specified terminator is reached or EOL has been found. This is inspired from ``find -exec [commands..] ;`` where commands.. is treated as arguments to -exec. If for an option ``opt``, ``terminator`` is specified to be ; (semi-colon), in the following $ program [options] --opt v --w=x -- "y z" \; [more-options] --opt will receive {"v", "--w=x", "--", "y z"} as its argument. Note that, the -- inside will also be passed to --opt regardless PassDoubleDash is set or not. However, once the scope of --opt is finished, i.e. terminator ; is reached, -- will act as before if PassDoubleDash is set. Use tag ``terminator`` to specify the terminator for the option related to that field. Please note that, the specified terminator should be a separate token, instead of being jotted with other characters. For example, --opt [arguments..] ; [options..] will be correctly parsed with terminator: ";". However, --opt [arguments..] arg; [options..] will not be correctly parsed. The parser will pass "arg;", and continue to look for the terminator in [options..].
- Loading branch information
1 parent
3927b71
commit df1e3bf
Showing
5 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters