diff options
Diffstat (limited to 'docs/luarocks_path.md')
-rw-r--r-- | docs/luarocks_path.md | 32 |
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 | |||
3 | Return the currently configured package path. | ||
4 | |||
5 | ## Usage | ||
6 | |||
7 | `luarocks path [--append] [--bin] [--lr-path | --lr-cpath | --lr-bin]` | ||
8 | |||
9 | Prints package paths for this installation of Luarocks formatted as a shell | ||
10 | script. The script prepends these values to default system ones | ||
11 | (`package.path` and `package.cpath`) and updates `$LUA_PATH` and `$LUA_CPATH` | ||
12 | environment variables. On Unix systems, you may run: | ||
13 | |||
14 | ``` | ||
15 | eval $(luarocks path) | ||
16 | ``` | ||
17 | |||
18 | If `--append` is passed, LuaRocks paths are appended to system values instead | ||
19 | of being prepended. | ||
20 | |||
21 | If `--bin` is passed it also prints path to the directories where | ||
22 | command-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 | ||
26 | paths, without systems values and not formatted as a shell script. | ||
27 | |||
28 | ## Example | ||
29 | |||
30 | ``` | ||
31 | luarocks path | ||
32 | ``` | ||