|
@@ -86,12 +86,12 @@ extern class Sys {
|
|
|
Run the given command. The command output will be printed on the same output as the current process.
|
|
|
The current process will block until the command terminates and it will return the command result (0 if there was no error).
|
|
|
|
|
|
- When `args` is not `null`, it will be used as the command arguments,
|
|
|
- with shell meta-characters automatically escaped and quoted if needed.
|
|
|
+ Command arguments can be passed in two ways: 1. using `args`, 2. appending to `cmd` and leaving `args` as `null`.
|
|
|
+
|
|
|
+ 1. When using `args` to pass command arguments, each argument will be automatically quoted, and shell meta-characters will be escaped if needed.
|
|
|
`cmd` should be an executable name that can be located in the `PATH` environment variable, or a path to an executable.
|
|
|
-
|
|
|
- When `args` is not given or is `null`, no automatic escaping/quoting is performed.
|
|
|
- `cmd` should include the command together with its arguments, formatted exactly as it would be when typed at the command line.
|
|
|
+
|
|
|
+ 2. When `args` is not given or is `null`, command arguments can be appended to `cmd`. No automatic quoting/escaping will be performed. `cmd` should be formatted exactly as it would be when typed at the command line.
|
|
|
It can run executables, as well as shell commands that are not executables (e.g. on Windows: `dir`, `cd`, `echo` etc).
|
|
|
|
|
|
Read the `sys.io.Process` api for a more complete way to start background processes.
|