diff options
| author | martin <martin@NetBSD.org> | 2022-02-21 17:58:11 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2022-02-21 17:58:11 +0000 |
| commit | 18422aa5b561f1a00cff9ccb8f8f4d21cd789bff (patch) | |
| tree | 9c55f9ccd5c9fcbd948489f98e81bceeab66949a /bin | |
| parent | 1ec694a4b275c5ef927f29b4f6f301506233e847 (diff) | |
Pull up following revision(s) (requested by kre in ticket #1429):
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 ...)
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/sh/histedit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 256fe3f2ce1..53cf0c7e9e0 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -1,4 +1,4 @@ -/* $NetBSD: histedit.c,v 1.55 2019/02/10 19:21:52 kre Exp $ */ +/* $NetBSD: histedit.c,v 1.55.2.1 2022/02/21 17:58:11 martin Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: histedit.c,v 1.55 2019/02/10 19:21:52 kre Exp $"); +__RCSID("$NetBSD: histedit.c,v 1.55.2.1 2022/02/21 17:58:11 martin Exp $"); #endif #endif /* not lint */ @@ -295,7 +295,7 @@ histcmd(volatile int argc, char ** volatile argv) (ch = getopt(argc, argv, ":e:lnrs")) != -1) switch ((char)ch) { case 'e': - editor = optionarg; + editor = optarg; break; case 'l': lflg = 1; |
