From 474a3ade88a2d3d81afa44c1edcd5c506b922c83 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Sat, 5 Sep 2026 13:55:25 +0200 Subject: Reject extra positional arguments --- yazi-enter.yazi/main.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'yazi-enter.yazi') diff --git a/yazi-enter.yazi/main.lua b/yazi-enter.yazi/main.lua index 55a58bc..f4f4333 100644 --- a/yazi-enter.yazi/main.lua +++ b/yazi-enter.yazi/main.lua @@ -25,6 +25,14 @@ local function normalize_options(args) normalize_boolean("insensitive", args.insensitive) end +local function validate_argument_keys(args) + for key in pairs(args) do + if type(key) == "number" and key ~= 1 then + error(("yazi-enter: unexpected positional argument at index %s"):format(key), 0) + end + end +end + local commit = ya.sync(function() return 0 end) -- cgit v1.2.3