You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for:
- --config CLI option in Common options section
- Configuration File section with locations, format, and examples
- Configuration precedence order
- Path expansion for home directory (~/)
- Examples showing various usage patterns
Copy file name to clipboardExpand all lines: README.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,10 @@ Commands:
210
210
These options are supported by all commands:
211
211
212
212
```
213
+
--config=<configFile>
214
+
Path to user configuration file (default: JPM_CONFIG
215
+
environment variable, ~/.config/jpm/config.yml, or
216
+
~/.jpmcfg.yml)
213
217
-c, --cache=<cacheDir>
214
218
Directory where downloaded artifacts will be cached
215
219
(default: value of JPM_CACHE environment variable;
@@ -535,6 +539,49 @@ actions:
535
539
clean: "rm -f *.class"
536
540
```
537
541
542
+
## Configuration File
543
+
544
+
`jpm` supports user-level configuration files to set default values for common command-line options. This allows you to configure preferences once instead of passing the same options repeatedly.
545
+
546
+
### Configuration File Locations
547
+
548
+
Configuration files are searched in the following order:
549
+
550
+
1. **Explicit path** - Specified via `--config` option or `JPM_CONFIG` environment variable
551
+
2. **`~/.config/jpm/config.yml`** - XDG Base Directory standard location (primary)
0 commit comments