Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/bin/sh



Module Name:    src
Committed By:   martin
Date:           Thu Feb 24 10:07:47 UTC 2022

Modified Files:
        src/bin/sh [netbsd-8]: histedit.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1736):

        bin/sh/histedit.c: revision 1.60

After (a few days short of) 21 years, revert 1.25, which did nothing except
make the -e option to "fc" fail to work (the commit message was about some
other changes entirely, so I an only assume this was committed by mistake).

It says a lot about the use of the fc command that no-one noticed that
this did not work properly for all this time.

Internally in sh, it is possible for built in commands to use either
getopt(3) (from libc) or the much simpler internal shell nextopt() routine
for option (flag) parsing.    However it makes no sense to use getopt()
and then access a global variable set only by nextopt() instead of the
one getopt() sets (which is what the code had used previously, forever).

Use the correct variable again.

XXX pullup -9 -8  (-7 -6 -5 ...)


To generate a diff of this commit:
cvs rdiff -u -r1.48.8.2 -r1.48.8.3 src/bin/sh/histedit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index