Skip to content

Commit

Permalink
cli: config: add docs for --show-origin (#2028)
Browse files Browse the repository at this point in the history
* cli: config: add docs for --show-origin

Support the --show-origin option for config, which, similar to git,
prefixes each config option with the source file it originated from.

References iterative/dvc#5119
References iterative/dvc#5126

* Update wording.

* Add note about the options near config file locations.

* Update content/docs/command-reference/config.md

Co-authored-by: Jorge Orpinel <[email protected]>
  • Loading branch information
mrstegeman and jorgeorpinel authored Feb 4, 2021
1 parent 613f11d commit 7b303fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion content/docs/command-reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Get or set <abbr>project</abbr>-level (or global) DVC configuration options.

```usage
usage: dvc config [-h] [--global | --system | --local] [-q | -v] [-u]
[-l] [name] [value]
[-l] [--show-origin] [name] [value]
positional arguments:
name Option name in format: section.option or remote.name.option
Expand Down Expand Up @@ -53,6 +53,9 @@ multiple projects and users, respectively:
> \* For Linux, the global `dvc/config` may be found in `$XDG_CONFIG_HOME`, and
> the system-wide one in `$XDG_CONFIG_DIRS[0]`, if those env vars are defined.
> Note that the `--show-origin` flag can show you where a given config option
> `value` is currently stored.
## Command options (flags)

- `-u`, `--unset` - remove a specified config option from a config file.
Expand All @@ -72,6 +75,9 @@ multiple projects and users, respectively:

- `-l`, `--list` - lists all defined config values.

- `--show-origin` - when listing or getting config options, also show the
location of the config file where each option `value` is found.

- `-h`, `--help` - prints the usage/help message, and exit.

- `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no
Expand Down

0 comments on commit 7b303fc

Please sign in to comment.