pub fn command_label(command: &Command) -> StringExpand description
What:
The name a run goes by in the lines about it: the program’s file name and its first word that is not an option, as in
git push, git fetch or git-lfs push.
Why:
The wait line must say which of the wrapper’s network runs is waiting, and the command is the only thing that knows. The
values of Git’s -c and -C options are skipped with them.
In TS you’d write (pseudocode):
const [program, ...args] = command; return [basename(program), args.find((word) => !word.startsWith('-'))].join(' ');