diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:55:25 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:55:25 +0200 |
| commit | 474a3ade88a2d3d81afa44c1edcd5c506b922c83 (patch) | |
| tree | 234081c511c15d9523f1ec8a8a267e65912c53b7 | |
| parent | 9956160e76561310589133fc7f3013775a54b6ea (diff) | |
Reject extra positional arguments
| -rw-r--r-- | yazi-enter.yazi/main.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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) |