From f32f6c8295a55e111f873e99a76ecb55afbc4c20 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Sat, 5 Sep 2026 13:54:44 +0200 Subject: Implement mode parser --- yazi-enter.yazi/main.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'yazi-enter.yazi/main.lua') diff --git a/yazi-enter.yazi/main.lua b/yazi-enter.yazi/main.lua index c900bc2..6765576 100644 --- a/yazi-enter.yazi/main.lua +++ b/yazi-enter.yazi/main.lua @@ -1,5 +1,13 @@ --- @since 26.9.1 +local function parse_mode(value) + if value == "directory" or value == "file" or value == "either" then + return value + end + + error("yazi-enter: mode must be directory, file, or either", 0) +end + local commit = ya.sync(function() return 0 end) -- cgit v1.2.3