Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use alice as username in cabal path examples #9931

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,36 +294,41 @@ installed binaries, and so on.

::

$ whoami
alice

$ cabal path
cache-home: /home/haskell/.cache/cabal/
remote-repo-cache: /home/haskell/.cache/cabal/packages
logs-dir: /home/haskell/.cache/cabal/logs
store-dir: /home/haskell/.local/state/cabal/store
config-file: /home/haskell/.config/cabal/config
installdir: /home/haskell/.local/bin
...
compiler-flavour: ghc
compiler-id: ghc-9.8.2
compiler-path: /home/alice/.ghcup/bin/ghc
cache-home: /home/alice/.cabal
remote-repo-cache: /home/alice/.cabal/packages
logs-dir: /home/alice/.cabal/logs
store-dir: /home/alice/.cabal/store
config-file: /home/alice/.cabal/config
installdir: /home/alice/.cabal/bin

Or using the json output:

::

$ cabal path --output-format=json
$ cabal path --output-format=json | jq

.. code-block:: json

{
"cabal-version": "3.13.0.0",
"compiler": {
"flavour": "ghc",
"id": "ghc-9.6.4",
"path": "/home/user/.ghcup/bin/ghc"
},
"cache-home": "/home/user/.cabal",
"remote-repo-cache": "/home/user/.cabal/packages",
"logs-dir": "/home/user/.cabal/logs",
"store-dir": "/home/user/.cabal/store",
"config-file": "/home/user/.cabal/config",
"installdir": "/home/user/.cabal/bin"
"cabal-version": "3.13.0.0",
"compiler": {
"flavour": "ghc",
"id": "ghc-9.8.2",
"path": "/home/alice/.ghcup/bin/ghc"
},
"cache-home": "/home/alice/.cabal",
"remote-repo-cache": "/home/alice/.cabal/packages",
"logs-dir": "/home/alice/.cabal/logs",
"store-dir": "/home/alice/.cabal/store",
"config-file": "/home/alice/.cabal/config",
"installdir": "/home/alice/.cabal/bin"
}

If ``cabal path`` is passed a single option naming a path, then that
Expand All @@ -332,7 +337,7 @@ path will be printed *without* any label:
::

$ cabal path --installdir
/home/haskell/.local/bin
/home/alice/.cabal/bin

While this interface is intended to be used for scripting, it is an experimental command.
Scripting example:
Expand Down
Loading