diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:54:44 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:54:44 +0200 |
| commit | f32f6c8295a55e111f873e99a76ecb55afbc4c20 (patch) | |
| tree | 4418a0dd025f7bd43558788cb99e43e1bb38a1c7 /yazi-enter.yazi | |
| parent | c7ab35c1382756bee6f4fbadaf13b6854ca618b7 (diff) | |
Implement mode parser
Diffstat (limited to 'yazi-enter.yazi')
| -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 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) |