DvvCz / cpkg

A dead simple package manager for C.
MIT License
1 stars 0 forks source link

Passing arguments to `cpkg run` #11

Open DvvCz opened 3 months ago

DvvCz commented 3 months ago

A major annoyance to cpkg run is that you can't pass any command line arguments to the binary, leading to doing something like cpkg build && ./mybin xyz instead of cpkg run xyz

It's even a pain for rust..

I think the only solution is the same as what cargo does, requiring a -- before you start writing arguments. This is since cpkg run <script> is valid now.

Alternative: Undo that choice and make it cpkg run --script test or cpkg script test, therefore freeing up any extra arguments to directly pass them to the binary.

DvvCz commented 3 months ago

I think scripts should just be cpkg foo.c (explicit c extension), and then that frees the arguments for cpkg run.

I believe bun does this? Need to look at prior art.