You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/cabal-commands.rst
+61-38Lines changed: 61 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -372,8 +372,10 @@ See ``cabal run`` for more information on scripts.
372
372
373
373
In addition ``cabal build`` accepts these flags:
374
374
375
-
- ``--only-configure``: When given we will forego performing a full build and
376
-
abort after running the configure phase of each target package.
375
+
.. option:: --only-configure
376
+
377
+
When given we will forego performing a full build and abort after running
378
+
the configure phase of each target package.
377
379
378
380
379
381
cabal repl
@@ -703,16 +705,23 @@ and two archives of the same format built from the same source will hash to the
703
705
704
706
``cabal sdist`` takes the following flags:
705
707
706
-
- ``-l``, ``--list-only``: Rather than creating an archive, lists files that would be included.
707
-
Output is to ``stdout`` by default. The file paths are relative to the project's root
708
-
directory.
708
+
.. option:: -l, --list-only
709
+
710
+
Rather than creating an archive, lists files that would be included.
711
+
712
+
Output is to ``stdout`` by default. The file paths are relative to the project's root
713
+
directory.
714
+
715
+
.. option:: -o, --output-directory
709
716
710
-
- ``-o``, ``--output-directory``: Sets the output dir, if a non-default one is desired. The default is
711
-
``dist-newstyle/sdist/``. ``--output-directory -`` will send output to ``stdout``
712
-
unless multiple archives are being created.
717
+
Sets the output dir, if a non-default one is desired. The default is
718
+
``dist-newstyle/sdist/``. ``--output-directory -`` will send output to ``stdout``
719
+
unless multiple archives are being created.
713
720
714
-
- ``--null-sep``: Only used with ``--list-only``. Separates filenames with a NUL
715
-
byte instead of newlines.
721
+
.. option:: --null-sep
722
+
723
+
Only used with ``--list-only``. Separates filenames with a NUL
724
+
byte instead of newlines.
716
725
717
726
``sdist`` is inherently incompatible with sdist hooks (which were removed in `Cabal-3.0`),
718
727
not due to implementation but due to fundamental core invariants
@@ -738,43 +747,57 @@ description file or freeze file.
738
747
739
748
``cabal outdated`` supports the following flags:
740
749
741
-
- ``--v1-freeze-file``: Read dependency version bounds from the freeze file
742
-
(``cabal.config``) instead of the package description file
743
-
(``$PACKAGENAME.cabal``).
750
+
.. option:: --v1-freeze-file
751
+
752
+
Read dependency version bounds from the freeze file.
753
+
754
+
(``cabal.config``) instead of the package description file
755
+
(``$PACKAGENAME.cabal``).
756
+
757
+
.. option:: --v2-freeze-file
758
+
759
+
:since: 2.4
760
+
761
+
Read dependency version bounds from the v2-style freeze file
762
+
(by default, ``cabal.project.freeze``) instead of the package
763
+
description file. ``--new-freeze-file`` is an alias for this flag
764
+
that can be used with pre-2.4 ``cabal``.
765
+
766
+
.. option:: --project-filePROJECTFILE
767
+
768
+
:since: 2.4
769
+
770
+
Read dependendency version bounds from the v2-style freeze file
771
+
related to the named project file (i.e., ``$PROJECTFILE.freeze``)
772
+
instead of the package desctription file. If multiple ``--project-file``
773
+
flags are provided, only the final one is considered. This flag
774
+
must only be passed in when ``--new-freeze-file`` is present.
744
775
745
-
- ``--v2-freeze-file``:
776
+
.. option:: --simple-output
746
777
747
-
:since: 2.4
778
+
Print only the names of outdated dependencies, one per line.
748
779
749
-
Read dependency version bounds from the v2-style freeze file
750
-
(by default, ``cabal.project.freeze``) instead of the package
751
-
description file. ``--new-freeze-file`` is an alias for this flag
752
-
that can be used with pre-2.4 ``cabal``.
780
+
.. option:: --exit-code
753
781
754
-
- ``--project-file PROJECTFILE``:
782
+
Exit with a non-zero exit code when there are outdated dependencies.
755
783
756
-
:since: 2.4
784
+
.. option:: -q, --quiet
757
785
758
-
Read dependendency version bounds from the v2-style freeze file
759
-
related to the named project file (i.e., ``$PROJECTFILE.freeze``)
760
-
instead of the package desctription file. If multiple ``--project-file``
761
-
flags are provided, only the final one is considered. This flag
762
-
must only be passed in when ``--new-freeze-file`` is present.
786
+
Don't print any output. Implies ``-v0`` and ``--exit-code``.
763
787
764
-
- ``--simple-output``: Print only the names of outdated dependencies, one per line.
788
+
.. option:: --ignorePACKAGENAMES
765
789
766
-
- ``--exit-code``: Exit with a non-zero exit code when there are outdated dependencies.
790
+
Don't warn about outdated dependency version bounds for the packages in this list.
767
791
768
-
- ``-q, --quiet``: Don't print any output. Implies ``-v0`` and ``--exit-code``.
792
+
.. option:: --minor[PACKAGENAMES]
769
793
770
-
- ``--ignore PACKAGENAMES``: Don't warn about outdated dependency version bounds for the packages in this list.
794
+
Ignore major version bumps for these packages.
771
795
772
-
- ``--minor [PACKAGENAMES]``: Ignore major version bumps for these packages.
773
-
E.g. if there's a version 2.0 of a package ``pkg`` on Hackage and the freeze
774
-
file specifies the constraint ``pkg == 1.9``, ``cabal outdated --freeze
775
-
--minor=pkg`` will only consider the ``pkg`` outdated when there's a version
776
-
of ``pkg`` on Hackage satisfying ``pkg > 1.9 && < 2.0``. ``--minor`` can also
777
-
be used without arguments, in that case major version bumps are ignored for
778
-
all packages.
796
+
E.g. if there's a version 2.0 of a package ``pkg`` on Hackage and the freeze
797
+
file specifies the constraint ``pkg == 1.9``, ``cabal outdated --freeze
798
+
--minor=pkg`` will only consider the ``pkg`` outdated when there's a version
799
+
of ``pkg`` on Hackage satisfying ``pkg > 1.9 && < 2.0``. ``--minor`` can also
800
+
be used without arguments, in that case major version bumps are ignored for
801
+
all packages.
779
802
780
-
See `the section on listing outdated dependency version bounds <cabal-package.html#listing-outdated-dependency-version-bounds>`__ for more details and examples.
803
+
See `the section on listing outdated dependency version bounds <cabal-package.html#listing-outdated-dependency-version-bounds>`__ for more details and examples.
0 commit comments