https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215207

Jilles Tjoelker <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Jilles Tjoelker <[email protected]> ---
The patched version ignores getopt(1)'s output except for the number of
iterations of a loop. This drops necessary adjustments made by getopt(1) such
as changing -ab to -a -b.

As noted in the BUGS section of getopt(1), fixing arguments with whitespace and
shell metacharacters is hard. With the current API, it is not possible.

A reasonable solution for shell scripts is to use the getopts builtin instead
of getopt(1). This fixes the problems with special characters and poor error
messages and simplifies the code in the script. The man page could recommend
this more.

If you insist on using something called "getopt" or want to use long options,
an alternative is to use a non-standard mode of the misc/getopt port.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to