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