-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
Allow typst watch --open to specify a command with arguments #4654
Comments
You can make your script executable and pass in the #/bin/sh
exec python3 script.py arg1 arg2
# exec ./script.py arg1 arg2 # I don't remember if you need `./` here. and then pass this script file instead. I think adding support for arguments would be nice, but you can live without it just fine as I showed you. Plus passing multiple arguments to a single flag is very hard. It becomes super messy when quotes and escaping comes into play. There are very few CLIs that do this ( I haven't tested any of that, but it all should work. |
I can't do either. Windows doesn't support #/bin/sh, and I don't have enough familiarity with a C compiler to create a special executable to do what I want, which seems like overkill. I have a workaround for now (wrote a script to check the file mod time of the .pdf file), but I do think there should be a way to pass in arguments.
Understood. I'm not looking to pass in arbitrary commands; I can handle the specialization with my script. But at least it should be possible to specify |
I don't like shindows, but I'm pretty sure you can do something similar with a |
|
Description
I would like Typst to run a Python script whenever a compilation completes. But right now
typst watch --open
only allows the name of a command (without arguments) to run.Use Case
Give users more freedom to run an arbitrary command
The text was updated successfully, but these errors were encountered: