@@ -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
@@ -970,6 +970,14 @@ We can also scope to test suite targets as they produce binaries.
970
970
$ cabal list-bin cabal-install:unit-tests
971
971
/.../dist-newstyle/.../unit-tests/unit-tests
972
972
973
+ It can also be used to display the location of the cached executable for a
974
+ cabal script.
975
+
976
+ ::
977
+
978
+ $ cabal list-bin path/to/script
979
+ $XDG_CACHE_HOME/cabal/script-builds/.../bin/script
980
+
973
981
Note that ``cabal list-bin `` will print the executables' location, but
974
982
will not make sure that these executables actually exist (i.e., have
975
983
been successfully built). In order to determine the correct location,
@@ -1140,6 +1148,9 @@ The executable is cached under the cabal directory, and can be pre-built with
1140
1148
``cabal build path/to/script `` and the cache can be removed with
1141
1149
``cabal clean path/to/script ``.
1142
1150
1151
+ The location of the cached executable can be displayed with
1152
+ ``cabal list-bin path/to/script ``.
1153
+
1143
1154
A note on targets: Whenever a command takes a script target and it matches the
1144
1155
name of another target, the other target is preferred. To load the script
1145
1156
instead pass it as an explicit path: ./script
0 commit comments