Skip to content
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

feat: support passing arguments to plugin #587

Merged
merged 3 commits into from
Jan 27, 2024
Merged

feat: support passing arguments to plugin #587

merged 3 commits into from
Jan 27, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Jan 27, 2024

You can now use the plugin command with --args for passing some arguments:

plugin your-plugin --args='foo bar'

Then receive them in your Lua code through args:

return {
  entry = function(self, args)
    ya.err(args[1]) -- "foo"
    ya.err(args[2]) -- "bar"
  end,
}

@sxyazi sxyazi merged commit c325c33 into main Jan 27, 2024
3 checks passed
@sxyazi sxyazi deleted the pr-9b9d1f6c branch January 27, 2024 07:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant