Skip to content

feat: command processors #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sammy-ette opened this issue Dec 18, 2024 · 0 comments · May be fixed by #343
Open

feat: command processors #332

sammy-ette opened this issue Dec 18, 2024 · 0 comments · May be fixed by #343

Comments

@sammy-ette
Copy link
Member

to facilitate features like #246 (and maybe autocd opt) some sort of "command processing" pipeline can be implemented. these are distinct from runners since they arent meant to actually run commands, theyre just meant to turn 1 command input into another. it will need context on the current runner in use though.

a processor function signature will look like:

function processor(command)
	return {
		continue = true,
		command = ''
	}
end
  • continue determines whether hilbish should continue with command execution (to pass it to a runner) or not. commands not continued will not be saved to history. this is the only required return value in the table.
  • command if present will be the command string passed to the runner. if it is not present, it will use the same command string passed to the processor.

when defining processors, it will work with a number based priority system. the lower the number, the earlier it runs.
2 processors, one with a priority value of -10 and another with a priority value of 3, the processor with -10 priority will run first, and then be passed to the next processor. this means early priority processors determine if further processing and execution happens. default processors will have documented and stable default priority values.

@sammy-ette sammy-ette added this to the v2.4 (Moonflower) milestone Dec 18, 2024
@sammy-ette sammy-ette linked a pull request Apr 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant