diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b67a96 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,23 @@ | |||
1 | Overview | ||
2 | -------- | ||
3 | |||
4 | lua-term is a Lua module for manipulating a terminal. | ||
5 | |||
6 | Installation | ||
7 | ------------ | ||
8 | |||
9 | lua-term is available on Luarocks. | ||
10 | |||
11 | Usage | ||
12 | ----- | ||
13 | |||
14 | ```lua | ||
15 | local term = require 'term' | ||
16 | local colors = term.colors -- or require 'term.colors' | ||
17 | |||
18 | print(term.isatty(io.stdout)) -- true if standard output goes to the terminal | ||
19 | |||
20 | print(color.red 'hello') | ||
21 | print(color.red .. 'hello' .. color.reset) | ||
22 | print(color.red, 'hello', color.reset) | ||
23 | ``` | ||