Skip to content

Commit dac8372

Browse files
committed
draft uenv config docs
1 parent a9240fd commit dac8372

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/software/uenv/configure.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,56 @@
11
[](){#ref-uenv-configure}
22
# Configuring uenv
3+
4+
Uenv is designed to work out of the box, with zero configuration for most users.
5+
6+
## User configuration
7+
8+
Uenv is configured using a text configuration file.
9+
10+
### Location of the configuration file
11+
12+
The location of the configuration file follows the [XDG base directory specification](https://specifications.freedesktop.org/basedir-spec/latest/).
13+
* If the `XDG_CONFIG_HOME` environment variable is set, the `$XDG_CONFIG_HOME/uenv/config`.
14+
* Otherwise it defaults to `$HOME/.config/uenv/config`.
15+
16+
### Syntax
17+
18+
A custom, but simple `key = value` syntax with comments marked with `#`
19+
20+
```
21+
# this is a comment
22+
23+
# the following are equivalent
24+
color = true
25+
color=true
26+
```
27+
28+
Notes on the syntax:
29+
30+
* keys are case-sensitive: `color` and `Color` are not equivalent.
31+
* all keys are lower case
32+
* white space is trimmed from keys and values, e.g.: `color = true` will be parsed as key=`color` and value=`true`.
33+
34+
### Options
35+
36+
| key | description | default | values |
37+
| --- | ----------- | -------- | ------ |
38+
| `color` | Use color output | automatically chosen according to TTY | `true`, `false` |
39+
| `repo` | The default repo location for downloaded uenv images | `$SCRATCH/.uenv-images` | An absolute path |
40+
41+
#### `color`
42+
43+
By default, uenv will generate color output according to the following:
44+
* if `--no-color` is passed, color output is disabled
45+
* else if `color` is set in the config file, use that setting
46+
* else if the `NO_COLOR` environment variable is defined color output is disabled
47+
* else if the terminal is not TTY disable color
48+
* else enable color output
49+
50+
#### `repo`
51+
52+
The location of
53+
54+
* if the `--repo` CLI arguement overrides
55+
* else if `color` is set in the config file, use that setting
56+
* else use the default value of `$SCRATCH/.uenv-images`

0 commit comments

Comments
 (0)