yes: Completely overengineer
If we're going to overengineer this, we may as well go all the way.
- If multiple arguments are given, concatenate them into a space- separated list like GNU coreutils does.
- When duplicating the expletive, do so exponentially.
- Most importantly, don't modify the memory that argv points to.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D55617
(cherry picked from commit cf74b63d61b49db848ecc20b87e7ee5f16671320)
yes: Add missing header
This is a no-op on FreeBSD due to namespace pollution.
MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: cf74b63d61b4 ("yes: Completely overengineer")
(cherry picked from commit ba7439f0a9604b15bfef8084816f34d55eb6bdf2)