aboutsummaryrefslogtreecommitdiff
path: root/docs/luarocks_path.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/luarocks_path.md')
-rw-r--r--docs/luarocks_path.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/luarocks_path.md b/docs/luarocks_path.md
new file mode 100644
index 00000000..05f36fe0
--- /dev/null
+++ b/docs/luarocks_path.md
@@ -0,0 +1,32 @@
1# luarocks path
2
3Return the currently configured package path.
4
5## Usage
6
7`luarocks path [--append] [--bin] [--lr-path | --lr-cpath | --lr-bin]`
8
9Prints package paths for this installation of Luarocks formatted as a shell
10script. The script prepends these values to default system ones
11(`package.path` and `package.cpath`) and updates `$LUA_PATH` and `$LUA_CPATH`
12environment variables. On Unix systems, you may run:
13
14```
15eval $(luarocks path)
16```
17
18If `--append` is passed, LuaRocks paths are appended to system values instead
19of being prepended.
20
21If `--bin` is passed it also prints path to the directories where
22command-line scripts provided by rocks are located, prepending it to
23`$PATH` (or appending if `--append` is used).
24
25`--lr-path`, `--lr-cpath`, and `--lr-bin` flags print just corresponding
26paths, without systems values and not formatted as a shell script.
27
28## Example
29
30```
31luarocks path
32```