From 95a85eedd21e03c2aebc2cd6357a37fcee83d7d9 Mon Sep 17 00:00:00 2001 From: sammyette Date: Wed, 23 Apr 2025 18:41:14 -0400 Subject: [PATCH] feat: add opt to skip processors --- docs/features/opts.md | 5 +++++ nature/opts/init.lua | 3 ++- nature/runner.lua | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/features/opts.md b/docs/features/opts.md index 2fb848d..f975c79 100644 --- a/docs/features/opts.md +++ b/docs/features/opts.md @@ -76,3 +76,8 @@ of an exact match. #### Default: `true` If this is enabled, when a background job is finished, a [notification](../notifications) will be sent. + +### `processorSkipList` +#### Value: `table` +#### Default: `{}` +A table listing the names of command processors to skip. diff --git a/nature/opts/init.lua b/nature/opts/init.lua index c1347a4..ca99cae 100644 --- a/nature/opts/init.lua +++ b/nature/opts/init.lua @@ -15,7 +15,8 @@ The nice lil shell for {blue}Lua{reset} fanatics! fuzzy = false, notifyJobFinish = true, crimmas = true, - tips = true + tips = true, + processorSkipList = {} } for optsName, default in pairs(defaultOpts) do diff --git a/nature/runner.lua b/nature/runner.lua index 19b4e06..f87f8e9 100644 --- a/nature/runner.lua +++ b/nature/runner.lua @@ -123,7 +123,9 @@ end -- @param priv bool function hilbish.runner.run(input, priv) bait.throw('command.preprocess', input) - local input, continue = hilbish.processors.execute(input) + local input, continue = hilbish.processors.execute(input, { + skip = hilbish.opts.processorSkipList + }) if not continue then finishExec(0, '', true) return