2013-10-15 19:17:36 +04:00
|
|
|
separate_arguments
|
|
|
|
------------------
|
|
|
|
|
|
|
|
Parse space-separated arguments into a semicolon-separated list.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
separate_arguments(<var> <UNIX|WINDOWS>_COMMAND "<args>")
|
|
|
|
|
|
|
|
Parses a unix- or windows-style command-line string "<args>" and
|
2015-06-05 00:51:22 +03:00
|
|
|
stores a semicolon-separated list of the arguments in ``<var>``. The
|
2013-10-15 19:17:36 +04:00
|
|
|
entire command line must be given in one "<args>" argument.
|
|
|
|
|
2015-06-05 00:51:22 +03:00
|
|
|
The ``UNIX_COMMAND`` mode separates arguments by unquoted whitespace. It
|
2013-10-15 19:17:36 +04:00
|
|
|
recognizes both single-quote and double-quote pairs. A backslash
|
2016-09-12 07:23:24 +03:00
|
|
|
escapes the next literal character (``\"`` is ``"``); there are no special
|
|
|
|
escapes (``\n`` is just ``n``).
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-06-05 00:51:22 +03:00
|
|
|
The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same
|
2013-10-15 19:17:36 +04:00
|
|
|
syntax the runtime library uses to construct argv at startup. It
|
|
|
|
separates arguments by whitespace that is not double-quoted.
|
|
|
|
Backslashes are literal unless they precede double-quotes. See the
|
2016-09-12 07:23:24 +03:00
|
|
|
MSDN article `Parsing C Command-Line Arguments`_ for details.
|
|
|
|
|
|
|
|
.. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx
|
2013-10-15 19:17:36 +04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2016-09-12 07:23:24 +03:00
|
|
|
separate_arguments(<var>)
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2016-09-12 07:23:24 +03:00
|
|
|
Convert the value of ``<var>`` to a semi-colon separated list. All
|
2013-10-15 19:17:36 +04:00
|
|
|
spaces are replaced with ';'. This helps with generating command
|
|
|
|
lines.
|