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

Accept arguments for command in plugin definition #1552

Closed
danielkza opened this issue Nov 8, 2022 · 3 comments · Fixed by #1698
Closed

Accept arguments for command in plugin definition #1552

danielkza opened this issue Nov 8, 2022 · 3 comments · Fixed by #1698
Assignees

Comments

@danielkza
Copy link

danielkza commented Nov 8, 2022

Currently plugin definitions only accept an executable, so there is no way to pass some pre-defined arguments to precede the ones from the template invocation.

As a (somewhat contrived) example, If i want a plugin to evaluate a python expression, I should be able to do:

plugins:
  py: ["python3", "-c"]
{{ py "print('Hello, world')" }}

So that I don't need to have "-c" in every invocation.

@danielkza
Copy link
Author

Other ways to define it in the config could also work nicely:

plugins:
  py:
    cmd: python3
    args: ["-c"]

@hairyhenderson
Copy link
Owner

Thanks for filing this @danielkza (and sorry for the delay!).

The args option seems reasonable.

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment or this will be automatically closed in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants