forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The flag works similarly to `-s` and `-run`, except that: - Additional command line arguments starting with a hyphen will be passed to the invoked script as well, whilst with `-s` and `-run` these arguments will be passed to the runtime system. - Command-line arguments will be passed directly to the function, without having to call `init:get_plain_arguments`. - Scripts that make use of this option only need to define a function of arity one, as passing no arguments will result in a call like `func([])` as opposed to `func()`, which would be the behaviour of the existing options. The documentation for the existing `-s` and `-run` options was updated to mention that they will not forward arguments starting with a hyphen to the specified function, to prevent surprises when using `argparse` or other option parser libraries.
- Loading branch information
1 parent
ef4f900
commit d4e90c4
Showing
3 changed files
with
89 additions
and
22 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