HomeFreeBSD

sh: accept fc options grouped behind one '-'

Description

sh: accept fc options grouped behind one '-'

As per Utility Syntax Guidelines, accept both forms: -l -n and -ln.

To do that, anticipate the source string for the next option that will
be parsed by nextopt(). It's not always *argptr, sometimes it is
nextopt_optptr.

To simplify the check for not_fcnumber, slightly modify nextopt() to
always nullify nextopt_optptr in cases where it would have been set
to point to a NUL character.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D35836

Details

Provenance
pstefAuthored on Aug 20 2022, 10:15 AM
Reviewer
jilles
Differential Revision
D35836: sh: accept fc options grouped behind one '-'
Parents
rG497240def87c: Retire clone_drain_lock
Branches
Unknown
Tags
Unknown