Files
v/doc/tool-arguments.md
895fa91836 tools: let the launcher own the command name for timeout, download, diff, repeat, time (#30086)
* tools: let the launcher own the command name for timeout, download, diff, repeat, time

`v <name>` passes the command name in front of the arguments for every tool. These five
tools then removed one argument again with `skip_executable()`, which only works through
the launcher. A direct run of the compiled tool lost its first argument: `timeout --version`
and `diff --version` both failed with "Expected at least N arguments, but got 0".

The launcher now removes the command name for these commands, as it already did for
`retry`, and the tools no longer skip it. A direct run and `v <name>` hand the tool the
same argv.

Co-Authored-By: WOZCODE <contact@withwoz.com>

* docs: explain consistent launcher and standalone tool arguments

---------

Co-authored-by: Richard Wheeler <18647491+PythonWillRule@users.noreply.github.com>
Co-authored-by: WOZCODE <contact@withwoz.com>
Co-authored-by: Alexander Medvednikov <alexander@medvednikov.com>
2026-10-11 09:15:30 +03:00

476 B

Tool arguments

The diff, download, repeat, time, and timeout tools accept the same arguments when run through the V launcher or as standalone executables. The launcher removes the tool command name before forwarding arguments, preserving the first option or positional argument.

For example, ./v timeout --version and a compiled timeout --version both print the version. Likewise, ./v time echo hello and a compiled time echo hello run the same command.