@@ -294,36 +294,41 @@ installed binaries, and so on.
294294
295295::
296296
297+ $ whoami
298+ alice
299+
297300 $ cabal path
298- cache-home: /home/haskell/.cache/cabal/
299- remote-repo-cache: /home/haskell/.cache/cabal/packages
300- logs-dir: /home/haskell/.cache/cabal/logs
301- store-dir: /home/haskell/.local/state/cabal/store
302- config-file: /home/haskell/.config/cabal/config
303- installdir: /home/haskell/.local/bin
304- ...
301+ compiler-flavour: ghc
302+ compiler-id: ghc-9.8.2
303+ compiler-path: /home/alice/.ghcup/bin/ghc
304+ cache-home: /home/alice/.cabal
305+ remote-repo-cache: /home/alice/.cabal/packages
306+ logs-dir: /home/alice/.cabal/logs
307+ store-dir: /home/alice/.cabal/store
308+ config-file: /home/alice/.cabal/config
309+ installdir: /home/alice/.cabal/bin
305310
306311Or using the json output:
307312
308313::
309314
310- $ cabal path --output-format=json
315+ $ cabal path --output-format=json | jq
311316
312317.. code-block :: json
313318
314319 {
315- "cabal-version" : " 3.13.0.0" ,
316- "compiler" : {
317- "flavour" : " ghc" ,
318- "id" : " ghc-9.6.4 " ,
319- "path" : " /home/user /.ghcup/bin/ghc"
320- },
321- "cache-home" : " /home/user /.cabal" ,
322- "remote-repo-cache" : " /home/user /.cabal/packages" ,
323- "logs-dir" : " /home/user /.cabal/logs" ,
324- "store-dir" : " /home/user /.cabal/store" ,
325- "config-file" : " /home/user /.cabal/config" ,
326- "installdir" : " /home/user /.cabal/bin"
320+ "cabal-version" : " 3.13.0.0" ,
321+ "compiler" : {
322+ "flavour" : " ghc" ,
323+ "id" : " ghc-9.8.2 " ,
324+ "path" : " /home/alice /.ghcup/bin/ghc"
325+ },
326+ "cache-home" : " /home/alice /.cabal" ,
327+ "remote-repo-cache" : " /home/alice /.cabal/packages" ,
328+ "logs-dir" : " /home/alice /.cabal/logs" ,
329+ "store-dir" : " /home/alice /.cabal/store" ,
330+ "config-file" : " /home/alice /.cabal/config" ,
331+ "installdir" : " /home/alice /.cabal/bin"
327332 }
328333
329334 If ``cabal path `` is passed a single option naming a path, then that
@@ -332,7 +337,7 @@ path will be printed *without* any label:
332337::
333338
334339 $ cabal path --installdir
335- /home/haskell/.local /bin
340+ /home/alice/.cabal /bin
336341
337342While this interface is intended to be used for scripting, it is an experimental command.
338343Scripting example:
0 commit comments