Skip to content

Commit b20e4ac

Browse files
rylykdlvhdr
authored andcommitted
docs: fix config loading order documentation to match actual implementation
1 parent cd22afc commit b20e4ac

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

docs/content/configuration/_index.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ configuration file depends on your system:
2222

2323
1. If `$GH_DASH_CONFIG` is a non-empty string, `gh-dash` will use this file for
2424
its configuration.
25-
1. If `$GH_DASH_CONFIG` isn't set and `$XDG_CONFIG_HOME` is a non-empty string,
26-
the default path is `$XDG_CONFIG_HOME/gh-dash/config.yml`.
27-
1. If neither `$GH_DASH_CONFIG` or `$XDG_CONFIG_HOME` are set, then:
28-
- On Linux and macOS systems, the default path is `$HOME/gh-dash/config.yml`.
29-
- On Windows systems, the default path is `%USERPROFILE%\gh-dash\config.yml`.
25+
2. If `$GH_DASH_CONFIG` isn't set and you're in a git repository, it will look for `.gh-dash.yml` or `.gh-dash.yaml`
26+
in the repository root.
27+
3. If neither of the above applies, then:
28+
- If `$XDG_CONFIG_HOME` is a non-empty string, the default path is `$XDG_CONFIG_HOME/gh-dash/config.yml`.
29+
- If `$XDG_CONFIG_HOME` isn't set, then:
30+
- On Linux and macOS systems, the default path is `$HOME/.config/gh-dash/config.yml`.
31+
- On Windows systems, the default path is `%USERPROFILE%\.config\gh-dash\config.yml`.
3032

3133
After `gh-dash` creates the default configuration, you can edit it.
3234

docs/content/getting-started/usage.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ gh dash --config path/to/configuration/file.yml
4545

4646
If you don't specify this flag, `gh-dash` uses the default configuration. If the file doesn't exist, gh-dash will create it. The location of the default configuration file depends on your system:
4747

48-
1. If Inside a git repo, `gh-dash` will look for a `.gh-dash.yml` file in the root of the repo.
49-
2. If `$GH_DASH_CONFIG` is a non-empty string, `gh-dash` will use this file for
48+
1. If `$GH_DASH_CONFIG` is a non-empty string, `gh-dash` will use this file for
5049
its configuration.
51-
3. If `$GH_DASH_CONFIG` isn't set and `$XDG_CONFIG_HOME` is a non-empty string,
52-
the default path is `$XDG_CONFIG_HOME/gh-dash/config.yml`.
53-
4. If neither `$GH_DASH_CONFIG` or `$XDG_CONFIG_HOME` are set, then:
54-
- On Linux and macOS systems, the default path is `$HOME/gh-dash/config.yml`.
55-
- On Windows systems, the default path is `%USERPROFILE%\gh-dash\config.yml`.
50+
2. If `$GH_DASH_CONFIG` isn't set and you're in a git repository, it will look for `.gh-dash.yml` or `.gh-dash.yaml`
51+
in the repository root.
52+
3. If neither of the above applies, then:
53+
- If `$XDG_CONFIG_HOME` is a non-empty string, the default path is `$XDG_CONFIG_HOME/gh-dash/config.yml`.
54+
- If `$XDG_CONFIG_HOME` isn't set, then:
55+
- On Linux and macOS systems, the default path is `$HOME/.config/gh-dash/config.yml`.
56+
- On Windows systems, the default path is `%USERPROFILE%\.config\gh-dash\config.yml`.
5657

5758
For more information about authoring configurations, see [Configuration][02].
5859

0 commit comments

Comments
 (0)