the option string would previously begin with -, which behaves differently with different implementation of getopt(3) - on GNU
as well as musl, it makes nonoption argv's get treated as options with value 1, while on BSD it permits literal '-' to be used as
an option.
Since we don't have any way to emulate the BSD behavior, and FreeBSD itself discourages use of it (it being there for backwards
compat only), just patch it out entirely and follow the GNU env semantics of '-' having special behavior when it is the first non-option argument.
This is good. I would like the explanation added to the top level DIFFERENCES file so we continue to maintain a central file explaining the various differences between these commands on FreeBSD and Linux.
the option string would previously begin with -, which behaves differently with different implementation of
getopt(3)
- on GNU as well as musl, it makes nonoption argv's get treated as options with value 1, while on BSD it permits literal '-' to be used as an option.Since we don't have any way to emulate the BSD behavior, and FreeBSD itself discourages use of it (it being there for backwards compat only), just patch it out entirely and follow the GNU env semantics of '-' having special behavior when it is the first non-option argument.