Add lesc (Lua Escape) executable

Uses %q to escape the entire input text to be pasted as-is into any Lua
document.
This commit is contained in:
Talia 2020-07-29 10:57:21 +02:00
parent 4c947498ac
commit c52ff69d2a
1 changed files with 3 additions and 0 deletions

3
bin/lesc Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env lua
print(string.format("%q", io.read("a"):gsub("\n$", "")))