summaryrefslogtreecommitdiff
path: root/yazi-enter.yazi
diff options
context:
space:
mode:
Diffstat (limited to 'yazi-enter.yazi')
-rw-r--r--yazi-enter.yazi/main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/yazi-enter.yazi/main.lua b/yazi-enter.yazi/main.lua
index 6765576..10ed117 100644
--- a/yazi-enter.yazi/main.lua
+++ b/yazi-enter.yazi/main.lua
@@ -8,6 +8,17 @@ local function parse_mode(value)
error("yazi-enter: mode must be directory, file, or either", 0)
end
+local function normalize_boolean(name, value)
+ if value == nil or value == false or value == "no" then
+ return false
+ end
+ if value == true or value == "yes" then
+ return true
+ end
+
+ error(("yazi-enter: option --%s must be true, false, 'yes', or 'no'"):format(name), 0)
+end
+
local commit = ya.sync(function()
return 0
end)