doc: clarify that all options (not just `-D`) should be single quoted when the arguments passed contain spaces

[skip ci]
time-shift
Houtan Bastani 2020-03-06 16:46:28 +01:00
parent 8d1bbfdd78
commit 5068520736
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 42 additions and 21 deletions

View File

@ -104,6 +104,23 @@ by the ``dynare`` command.
Octave, it also means that the ``.mod`` file cannot be named
``test.mod`` or ``example.mod``.
.. _quote-note:
.. note::
Note on Quotes
When passing command line options that contains a space (or, under
Octave, a double quote), you must surround the entire option (keyword
and argument) with single quotes, as in the following example.
*Example*
Call Dynare with options containing spaces
.. code-block:: matlab
>> dynare <<modfile.mod>> '-DA=[ i in [1,2,3] when i > 1 ]' 'conffile=C:\User\My Documents\config.txt'
*Options*
.. option:: noclearall
@ -140,10 +157,11 @@ by the ``dynare`` command.
.. option:: savemacro[=FILENAME]
Instructs ``dynare`` to save the intermediary file which is
obtained after macro processing (see :ref:`macro-proc-lang`);
the saved output will go in the file specified, or if no file
is specified in ``FILENAME-macroexp.mod``
Instructs ``dynare`` to save the intermediary file which is obtained
after macro processing (see :ref:`macro-proc-lang`); the saved output
will go in the file specified, or if no file is specified in
``FILENAME-macroexp.mod``. See the :ref:`note on quotes<quote-note>`
for info on passing a ``FILENAME`` argument containing spaces.
.. option:: onlymacro
@ -298,9 +316,10 @@ by the ``dynare`` command.
.. option:: matlabroot=<<path>>
The path to the MATLAB installation for use with
:opt:`use_dll`. Dynare is able to set this automatically,
so you should not need to set it yourself.
The path to the MATLAB installation for use with :opt:`use_dll`. Dynare
is able to set this automatically, so you should not need to set it
yourself. See the :ref:`note on quotes<quote-note>` for info on
passing a ``<<path>>`` argument containing spaces.
.. option:: parallel[=CLUSTER_NAME]
@ -313,9 +332,11 @@ by the ``dynare`` command.
.. option:: conffile=FILENAME
Specifies the location of the configuration file if it differs
from the default. See :ref:`conf-file`, for more information
about the configuration file and its default location.
Specifies the location of the configuration file if it differs from the
default. See :ref:`conf-file`, for more information about the
configuration file and its default location. See the :ref:`note on
quotes<quote-note>` for info on passing a ``FILENAME`` argument
containing spaces.
.. option:: parallel_slave_open_mode
@ -333,11 +354,10 @@ by the ``dynare`` command.
Defines a macro-variable from the command line (the same effect as
using the Macro directive ``@#define`` in a model file, see
:ref:`macro-proc-lang`). Note that when passing a MACRO_EXPRESSION that
contains a space (or, under Octave, a double quote), you must surround
the entire ``-D`` flag with single quotes, as in the following example.
Also note that an expression passed on the command line can reference
variables defined before it.
:ref:`macro-proc-lang`). See the :ref:`note on quotes<quote-note>` for
info on passing a ``MACRO_EXPRESSION`` argument containing spaces. Note
that an expression passed on the command line can reference variables
defined before it.
*Example*
@ -349,12 +369,13 @@ by the ``dynare`` command.
.. option:: -I<<path>>
Defines a path to search for files to be included by the
macro processor (using the ``@#include`` command). Multiple
``-I`` flags can be passed on the command line. The paths will
be searched in the order that the ``-I`` flags are passed and
the first matching file will be used. The flags passed here
take priority over those passed to ``@#includepath``.
Defines a path to search for files to be included by the macro
processor (using the ``@#include`` command). Multiple ``-I`` flags can
be passed on the command line. The paths will be searched in the order
that the ``-I`` flags are passed and the first matching file will be
used. The flags passed here take priority over those passed to
``@#includepath``. See the :ref:`note on quotes<quote-note>` for info
on passing a ``<<path>>`` argument containing spaces.
.. option:: nostrict