summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-07 17:17:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-07 17:18:03 (GMT)
commit4cf80f413b7f75145ad5ae61139cd75ebe8e44e4 (patch)
treefc9a2a47d4d36b6c055b12f1f43c917c679dfcb0 /Help
parentdd6ca78800fc089c45bcf4b67441556e80c3f8ec (diff)
parentb10930040dc329f1d40ea5d2f8b5f4406eb6012b (diff)
downloadCMake-4cf80f413b7f75145ad5ae61139cd75ebe8e44e4.zip
CMake-4cf80f413b7f75145ad5ae61139cd75ebe8e44e4.tar.gz
CMake-4cf80f413b7f75145ad5ae61139cd75ebe8e44e4.tar.bz2
Merge topic 'cmcmd-end-of-options-delimiter'
b10930040d cmcmd: add end of options delimiter to cmake -E commands Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6934
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake.1.rst21
-rw-r--r--Help/release/dev/cmcmd-end-of-options-delimiter.rst7
2 files changed, 23 insertions, 5 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index c2b4d68..6383faf 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -646,11 +646,17 @@ Available commands are:
``true`` if cmake supports server-mode and ``false`` otherwise.
Always false since CMake 3.20.
-``cat <files>...``
+``cat [--] <files>...``
.. versionadded:: 3.18
Concatenate files and print on the standard output.
+ .. versionadded:: 3.24
+ Added support for the double dash argument ``--``. This basic implementation
+ of ``cat`` does not support any options, so using a option starting with
+ ``-`` will result in an error. Use ``--`` to indicate the end of options, in
+ case a file starts with ``-``.
+
``chdir <dir> <cmd> [<arg>...]``
Change the current working directory and run a command.
@@ -719,11 +725,16 @@ Available commands are:
``echo_append [<string>...]``
Displays arguments as text but no new line.
-``env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...``
+``env [--unset=NAME ...] [NAME=VALUE ...] [--] <command> [<arg>...]``
.. versionadded:: 3.1
Run command in a modified environment.
+ .. versionadded:: 3.24
+ Added support for the double dash argument ``--``. Use ``--`` to stop
+ interpreting options/environment variables and treat the next argument as
+ the command, even if it start with ``-`` or contains a ``=``.
+
``environment``
Display the current environment variables.
@@ -816,16 +827,16 @@ Available commands are:
Rename a file or directory (on one volume). If file with the ``<newname>`` name
already exists, then it will be silently replaced.
-``rm [-rRf] <file> <dir>...``
+``rm [-rRf] [--] <file|dir>...``
.. versionadded:: 3.17
Remove the files ``<file>`` or directories ``<dir>``.
-
Use ``-r`` or ``-R`` to remove directories and their contents recursively.
If any of the listed files/directories do not exist, the command returns a
non-zero exit code, but no message is logged. The ``-f`` option changes
the behavior to return a zero exit code (i.e. success) in such
- situations instead.
+ situations instead. Use ``--`` to stop interpreting options and treat all
+ remaining arguments as paths, even if they start with ``-``.
``server``
Launch :manual:`cmake-server(7)` mode.
diff --git a/Help/release/dev/cmcmd-end-of-options-delimiter.rst b/Help/release/dev/cmcmd-end-of-options-delimiter.rst
new file mode 100644
index 0000000..bc9cc21
--- /dev/null
+++ b/Help/release/dev/cmcmd-end-of-options-delimiter.rst
@@ -0,0 +1,7 @@
+cmcmd-end-of-options-delimiter
+------------------------------
+
+* The :manual:`cmake(1)` ``-E`` commands ``cat`` and ``env`` learned to respect
+ a double dash (``--``) argument that acts as a delimiter indicating the end of
+ options. Any following arguments are treated as operands/positional arguments,
+ even if they begin with a dash ``-`` character.