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:
parent
4c947498ac
commit
c52ff69d2a
1 changed files with 3 additions and 0 deletions
3
bin/lesc
Executable file
3
bin/lesc
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env lua
|
||||
|
||||
print(string.format("%q", io.read("a"):gsub("\n$", "")))
|
Loading…
Reference in a new issue