Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
instead of `run` subcommand, treat first positional argument as the zig run target #1505
Here's one use case:
As an example, on my home OS - NixOS - the
The other use case is that Zig now enters the playing field, alongside commands like these:
This command would be unambiguous: args would be parsed normally until the first positional argument. If the first positional argument does not have a
Here is a demonstration that it would be unambiguous:
So as long as no zig subcommands have a
cc @tiehuis - I think we discussed this before and ended up on status quo, but I'd like to bring it up one more time.
This is unambiguous in most but not all cases.
Invoking shebang scripts on the PATH uses absolute paths, so this is good:
However, we can get ambiguity by calling
(I think the
As of GNU coreutils v8.30, you can do:
This feature was added in a recent (2018-04-20) commit to
More examples are available in the GNU coreutils manual.
Note: This only applies to shebangs that use