@@ -245,8 +245,8 @@ A cabal command target can take any of the following forms:
245
245
component of which the given filepath is a part of will be built.
246
246
247
247
- A script target: ``path/to/script ``, which specifies the path to a script
248
- file. This is supported by ``build ``, ``repl ``, ``run ``, and `` clean ``.
249
- Script targets are not part of a package.
248
+ file. This is supported by ``build ``, ``repl ``, ``run ``, `` list-bin ``, and
249
+ `` clean ``. Script targets are not part of a package.
250
250
251
251
.. _command-group-global :
252
252
@@ -963,6 +963,14 @@ We can also scope to test suite targets as they produce binaries.
963
963
$ cabal list-bin cabal-install:unit-tests
964
964
/.../dist-newstyle/.../unit-tests/unit-tests
965
965
966
+ It can also be used to display the location of the cached executable for a
967
+ cabal script.
968
+
969
+ ::
970
+
971
+ $ cabal list-bin path/to/script
972
+ $XDG_CACHE_HOME/cabal/script-builds/.../bin/script
973
+
966
974
Note that ``cabal list-bin `` will print the executables' location, but
967
975
will not make sure that these executables actually exist (i.e., have
968
976
been successfully built). In order to determine the correct location,
@@ -1133,6 +1141,9 @@ The executable is cached under the cabal directory, and can be pre-built with
1133
1141
``cabal build path/to/script `` and the cache can be removed with
1134
1142
``cabal clean path/to/script ``.
1135
1143
1144
+ The location of the cached executable can be displayed with
1145
+ ``cabal list-bin path/to/script ``.
1146
+
1136
1147
A note on targets: Whenever a command takes a script target and it matches the
1137
1148
name of another target, the other target is preferred. To load the script
1138
1149
instead pass it as an explicit path: ./script
0 commit comments