diff options
Diffstat (limited to '')
-rw-r--r-- | docs/luarocks_config.md | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/docs/luarocks_config.md b/docs/luarocks_config.md new file mode 100644 index 00000000..54553399 --- /dev/null +++ b/docs/luarocks_config.md | |||
@@ -0,0 +1,60 @@ | |||
1 | # luarocks config | ||
2 | |||
3 | Query information about the LuaRocks configuration. | ||
4 | |||
5 | # Usage | ||
6 | |||
7 | ``` | ||
8 | luarocks config (<key> | <key> <value> --scope=<scope> | <key> --unset --scope=<scope> | ) | ||
9 | ``` | ||
10 | |||
11 | When given a configuration key, it prints the value of that key | ||
12 | according to the currently active configuration (taking into account | ||
13 | all config files and any command-line flags passed) | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | * `luarocks config lua_interpreter` | ||
18 | * `luarocks config variables.LUA_INCDIR` | ||
19 | * `luarocks config lua_version` | ||
20 | |||
21 | When given a configuration key and a value, | ||
22 | it overwrites the config file (see the --scope option below to determine which) | ||
23 | and replaces the value of the given key with the given value. | ||
24 | |||
25 | * `lua_dir` is a special key as it checks for a valid Lua installation | ||
26 | (equivalent to --lua-dir) and sets several keys at once. | ||
27 | * `lua_version` is a special key as it changes the default Lua version | ||
28 | used by LuaRocks commands (equivalent to passing --lua-version). | ||
29 | |||
30 | Examples: | ||
31 | |||
32 | * `luarocks config variables.OPENSSL_DIR /usr/local/openssl` | ||
33 | * `luarocks config lua_dir /usr/local` | ||
34 | * `luarocks config lua_version 5.3` | ||
35 | |||
36 | When given a configuration key and --unset, | ||
37 | it overwrites the config file (see the --scope option below to determine which) | ||
38 | and deletes that key from the file. | ||
39 | |||
40 | Example: `luarocks config variables.OPENSSL_DIR --unset` | ||
41 | |||
42 | When given no arguments, it prints the entire currently active | ||
43 | configuration, resulting from reading the config files from | ||
44 | all scopes. | ||
45 | |||
46 | Example: `luarocks config` | ||
47 | |||
48 | ## Options | ||
49 | |||
50 | ``` | ||
51 | --scope=<scope> The scope indicates which config file should be rewritten. | ||
52 | Accepted values are "system", "user" or "project". | ||
53 | * Using a wrapper created with `luarocks init`, | ||
54 | the default is "project". | ||
55 | * Using --local (or when `local_by_default` is `true`), | ||
56 | the default is "user". | ||
57 | * Otherwise, the default is "system". | ||
58 | |||
59 | --json Output as JSON | ||
60 | ``` | ||