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.
Currently, when wanting to run programs via `-s` or `-run` that take arguments, one has to use the form `-s M F -extra A1 A2 ...`. This is cumbersome to remember and must be documented appropriately. Furthermore, the documentation for `-s` recommends to use `-run` instead, as `-s` passes arguments as atoms. This commit introduces a new flag, `-S`, which combines `-s`, `-run`, and `-extra`: arguments will be passed as strings, can be passed without the `-extra` flag. Two pieces in Erlang that would benefit from this as is: - The C sources for dialyzer, escript and typer all use `-extra` to pass additional arguments. - erlang#7299, if merged, would allow using `erl -S httpd serve --port 1234` instead of `erl -s httpd serve -extra --port 1234`. The `-S` flag was chosen because I find it easier to remember compared to another form of `-run`, and because Elixir uses the same flag.
- Loading branch information
1 parent
ef4f900
commit 7cdd5b5
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