@@ -245,8 +245,8 @@ A cabal command target can take any of the following forms:
245245 component of which the given filepath is a part of will be built.
246246
247247- 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.
250250
251251.. _command-group-global :
252252
@@ -970,6 +970,14 @@ We can also scope to test suite targets as they produce binaries.
970970 $ cabal list-bin cabal-install:unit-tests
971971 /.../dist-newstyle/.../unit-tests/unit-tests
972972
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+
973981Note that ``cabal list-bin `` will print the executables' location, but
974982will not make sure that these executables actually exist (i.e., have
975983been 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
11401148``cabal build path/to/script `` and the cache can be removed with
11411149``cabal clean path/to/script ``.
11421150
1151+ The location of the cached executable can be displayed with
1152+ ``cabal list-bin path/to/script ``.
1153+
11431154A note on targets: Whenever a command takes a script target and it matches the
11441155name of another target, the other target is preferred. To load the script
11451156instead pass it as an explicit path: ./script
0 commit comments