Skip to content

Commit

Permalink
Document loading configuration from env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed May 7, 2024
1 parent cc9f23f commit b43c77d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
description=textwrap.dedent(
"""
The configuration file path is ``$XDG_CONFIG_HOME/osc/oscrc``, which usually translates into ``~/.config/osc/oscrc``.
The configuration options are loaded with the following priority:
1. environment variables: ``OSC_<uppercase_option>`` or ``OSC_<uppercase_host_alias>_<uppercase_host_option>``
2. command-line options
3. oscrc config file
"""
),
sections={
Expand Down
4 changes: 2 additions & 2 deletions osc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,8 @@ def get_config(override_conffile=None,
Configure osc.
The configuration options are loaded with the following priority:
1. environment variables: OSC_<uppercase_option>
2. override arguments provided to get_config()
1. environment variables: ``OSC_<uppercase_option>`` or ``OSC_<uppercase_host_alias>_<uppercase_host_option>``
2. override arguments provided to ``get_config()``
3. oscrc config file
"""

Expand Down

0 comments on commit b43c77d

Please sign in to comment.