Skip to content

Commit e9fdb85

Browse files
authored
Merge pull request #8545 from athas/docs-directories
Elaborate on XDG directories in users guide.
2 parents 01b139e + 289e720 commit e9fdb85

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

doc/config.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,27 @@ Directory Specification, as listed below.
9595
Directories
9696
-----------
9797

98-
Unless the ``CABAL_DIR`` environment variable is set or `~/.cabal` exists, Cabal will store
99-
data in directories according to the XDG Base Directory Specification.
100-
The following directories are used:
98+
Unless the ``CABAL_DIR`` environment variable is set or a ``~/.cabal``
99+
directory exists, Cabal will by default store data in directories
100+
according to the XDG Base Directory Specification. The following
101+
directories are used unless otherwise specified in the configuration
102+
file:
101103

102-
* ``$XDG_CONFIG_HOME/cabal`` for the main configuration file. On
103-
Unix, this defaults to ``~/.config/cabal``. On Windows this defaults to
104-
``%APPDATA%/cabal``. Overridden by the ``CABAL_CONFIG`` environment
105-
variable if set.
104+
* ``$XDG_CONFIG_HOME/cabal`` for the main configuration file.
105+
Defaults to ``~/.config/cabal`` on Unix, and ``%APPDATA%/cabal`` on
106+
Windows. Overridden by the ``CABAL_CONFIG`` environment variable if
107+
set.
106108

107109
* ``$XDG_CACHE_HOME/cabal`` for downloaded packages and script
108110
executables. Defaults to ``~/.cache/cabal`` on Unix, and
109111
``%LOCALAPPDATA%/cabal`` on Windows. You can delete this directory
110112
and expect that its contents will be reconstructed as needed.
111113

112114
* ``$XDG_STATE_HOME/cabal`` for compiled libraries and other stateful
113-
artifacts. Defaults to ``~/.local/state/cabal`` on Unix and
114-
``%LOCALAPPDATA%/cabal`` on Windows. Deleting this directory might
115-
cause installed programs to stop working.
115+
artifacts, including the Cabal store. Defaults to
116+
``~/.local/state/cabal`` on Unix and ``%LOCALAPPDATA%/cabal`` on
117+
Windows. Deleting this directory might cause installed programs to
118+
stop working.
116119

117120
* ``~/.local/bin`` for executables installed with ``cabal install``.
118121

0 commit comments

Comments
 (0)