Merge pull request #2514 from MolarAmbiguity/master

Add info about overlaying configs, Resolves #2084
This commit is contained in:
Adrian Sampson 2017-04-15 15:34:00 -04:00
commit 560d003375
2 changed files with 14 additions and 4 deletions

View file

@ -1122,9 +1122,11 @@ def _configure(options):
# special handling lets specified plugins get loaded before we
# finish parsing the command line.
if getattr(options, 'config', None) is not None:
config_path = options.config
overlay_path = options.config
del options.config
config.set_file(config_path)
config.set_file(overlay_path)
else:
overlay_path = None
config.set_args(options)
# Configure the logger.
@ -1133,6 +1135,10 @@ def _configure(options):
else:
log.set_global_level(logging.INFO)
if overlay_path:
log.debug(u'overlaying configuration: {0}',
util.displayable_path(overlay_path))
config_path = config.user_config_path()
if os.path.isfile(config_path):
log.debug(u'user configuration: {0}',

View file

@ -72,7 +72,7 @@ box. To extract `rar` files, install the `rarfile`_ package and the
Optional command flags:
* By default, the command copies files your the library directory and
updates the ID3 tags on your music. In order to move the files, instead of
updates the ID3 tags on your music. In order to move the files, instead of
copying, use the ``-m`` (move) option. If you'd like to leave your music
files untouched, try the ``-C`` (don't copy) and ``-W`` (don't write tags)
options. You can also disable this behavior by default in the
@ -409,7 +409,11 @@ import ...``.
* ``-v``: verbose mode; prints out a deluge of debugging information. Please use
this flag when reporting bugs. You can use it twice, as in ``-vv``, to make
beets even more verbose.
* ``-c FILE``: read a specified YAML :doc:`configuration file <config>`.
* ``-c FILE``: read a specified YAML :doc:`configuration file <config>`. This
configuration works as an overlay: rather than replacing your normal
configuration options entirely, the two are merged. Any individual options set
in this config file will override your base configuration.
Beets also uses the ``BEETSDIR`` environment variable to look for
configuration and data.