-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Allows Specifying the Insertion Position of Extra Arguments Supplied to pdm run
#1507
Comments
I am interested into this because I might have the same issue with composite commands. After a lots of thinking, I came to the conclusion that the best approach is the same as Remains one issue: until now all args are given to the tail of the command by default and while the Does it seems an acceptable solution/compromise ? |
SGTM, while I prefer the name |
Actually, so do I, so |
There it is #1533 🚀 |
Is your feature request related to a problem? Please describe.
I'm using PDM scripts to both run commands in PDM environment, and also as a shorthand for providing common parameters.
For example, in a Django project, it's common to run commands with
manage.py
. I will use script likeSo that I can use command
pdm manage migrate
, instead ofpdm run python manage.py migrate
. Where the common prefixpython manage.py ...
can be reused.However, I found that one of my tools (specifically,
pre-commit
) has commands and arguments in this format:The parameters like
--config
must come after commands likeinstall
. If I create scriptand execute
pdm run pre-commit install
, the additional argumentinstall
will always be appeneded to thecmd
and resultingwhich is invalid for
pre-commit
.Since the common parts (
pre-commit
and--config somewhere/config.yml
) of the commands are not a prefix, there is no way for me to create shorthand PDM scripts for them.It would be greate if we can specify the insertion position of extra arguments supplied to
pdm run
.Describe the solution you'd like
We can provide an optional placeholder to the
cmd
. e.g.:The text was updated successfully, but these errors were encountered: