aboutsummaryrefslogtreecommitdiff
path: root/docs/luarocks_config.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/luarocks_config.md60
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
3Query information about the LuaRocks configuration.
4
5# Usage
6
7```
8luarocks config (<key> | <key> <value> --scope=<scope> | <key> --unset --scope=<scope> | )
9```
10
11When given a configuration key, it prints the value of that key
12according to the currently active configuration (taking into account
13all config files and any command-line flags passed)
14
15Examples:
16
17* `luarocks config lua_interpreter`
18* `luarocks config variables.LUA_INCDIR`
19* `luarocks config lua_version`
20
21When given a configuration key and a value,
22it overwrites the config file (see the --scope option below to determine which)
23and 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
30Examples:
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
36When given a configuration key and --unset,
37it overwrites the config file (see the --scope option below to determine which)
38and deletes that key from the file.
39
40Example: `luarocks config variables.OPENSSL_DIR --unset`
41
42When given no arguments, it prints the entire currently active
43configuration, resulting from reading the config files from
44all scopes.
45
46Example: `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```