From c52ff69d2a5c1c5a885b9c9ef762aea9d90a2592 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 29 Jul 2020 10:57:21 +0200 Subject: [PATCH] Add lesc (Lua Escape) executable Uses %q to escape the entire input text to be pasted as-is into any Lua document. --- bin/lesc | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/lesc diff --git a/bin/lesc b/bin/lesc new file mode 100755 index 0000000..a6591f6 --- /dev/null +++ b/bin/lesc @@ -0,0 +1,3 @@ +#!/usr/bin/env lua + +print(string.format("%q", io.read("a"):gsub("\n$", "")))