We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 285c0ee commit b596499Copy full SHA for b596499
demo/xtra/DIFF.LUA
@@ -1,4 +1,4 @@
1
-#!/usr/bin/env lua
+#!/usr/bin/env lua
2
3
CL = 3
4
local function diff_u(fn1, fn2)
@@ -93,5 +93,14 @@ local function diff_u(fn1, fn2)
93
if #buf.line > 0 then flush_buf() end
94
end
95
96
-if #arg < 2 then return end
97
-diff_u(arg[1], arg[2])
+if #arg < 2 or #arg % 2 ~= 0 then
+ print(arg[-1] .. " " .. arg[0] .. [[ old new ...
98
+
99
+Compare differences between old and new files and print them as unified context.
100
+To compare multiple sets of files at a time, write as sequential parameters.
101
+Example: ']] .. arg[0] .. [[ old1 new1 old2 new2 old3 new3' etc...]])
102
+ os.exit(1)
103
+end
104
+for i = 1, #arg, 2 do
105
+ diff_u(arg[i], arg[i + 1])
106
0 commit comments