Kyle Evans
f555b39e6b
man: reset OPTIND before parsing args
...
From jilles: POSIX requires that a script set `OPTIND=1` before using
different sets of parameters with `getopts`, or the results will be
unspecified.
The specific problem observed here is that we would execute `man -f` or
`man -k` without cleaning up state from man_parse_args()' `getopts`
loop. FreeBSD's /bin/sh seems to reset OPTIND to 1 after we hit the
second getopts loop, rendering the following shift harmless; other
/bin/sh implementations will leave it at what we came into the loop at
(e.g., bash as /bin/sh), shifting off any keywords that we had.
Input from: jilles
Reviewed by: allanjude, bapt, imp
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32063
2021-09-23 14:13:34 -05:00
..
2021-08-13 16:58:18 -04:00
2021-08-02 15:53:26 -06:00
2021-03-12 09:45:14 -07:00
2021-06-21 08:40:54 -06:00
2021-06-21 08:40:54 -06:00
2021-06-25 16:02:40 -07:00
2020-12-29 14:21:50 -08:00
2020-11-16 18:41:49 +00:00
2021-09-17 16:07:23 -07:00
2021-05-25 16:23:20 +01:00
2021-09-13 21:52:40 +01:00
2021-01-10 19:02:56 -05:00
2021-09-07 10:23:14 +02:00
2021-03-04 14:52:12 +01:00
2020-12-29 14:21:50 -08:00
2021-09-16 09:31:44 +02:00
2021-08-25 18:20:59 +02:00
2021-01-07 09:31:03 +00:00
2021-02-03 17:06:07 +00:00
2021-05-26 10:12:12 -04:00
2021-03-03 14:21:56 -06:00
2021-05-13 10:10:22 +02:00
2021-03-13 18:26:15 +01:00
2021-07-05 10:14:25 +08:00
2020-11-19 19:05:16 +00:00
2021-09-07 10:25:23 +02:00
2021-05-03 19:18:26 +03:00
2021-08-13 11:28:06 +02:00
2020-12-26 11:47:47 -05:00
2021-07-09 14:09:14 +02:00
2020-12-08 23:38:26 +00:00
2021-07-29 06:40:57 +00:00
2020-11-29 18:22:14 +00:00
2021-06-15 06:51:16 -06:00
2020-12-19 12:54:00 +00:00
2021-08-14 10:08:49 +02:00
2020-11-20 16:41:32 +00:00
2021-09-22 00:18:44 +03:00
2021-03-24 10:51:25 +03:00
2021-07-02 09:21:05 +01:00
2021-01-09 18:37:25 +01:00
2021-08-28 23:39:16 +03:00
2021-07-17 22:51:28 -07:00
2021-07-17 22:20:44 -07:00
2021-04-21 10:56:29 +01:00
2021-02-10 16:41:35 +00:00
2020-12-11 08:04:54 +00:00
2020-12-11 19:27:21 +00:00
2021-07-06 10:51:16 +01:00
2020-12-29 21:48:12 +01:00
2020-12-29 21:35:24 +01:00
2021-04-08 21:16:54 +02:00
2021-09-23 14:13:34 -05:00
2021-08-02 14:33:25 +01:00
2021-08-02 14:33:25 +01:00
2021-08-02 14:33:25 +01:00
2021-08-02 14:33:25 +01:00
2021-08-09 13:53:30 +02:00
2020-12-10 21:06:06 +00:00
2021-02-25 14:25:11 +01:00
2021-07-02 08:42:34 +02:00
2021-08-23 09:21:28 +02:00
2021-09-07 10:22:16 +02:00
2021-05-31 16:12:44 -06:00
2021-07-22 14:23:22 -05:00
2021-09-17 15:42:07 +03:00
2021-02-14 03:24:58 +02:00
2021-08-08 10:16:06 +02:00
2021-01-05 16:32:27 +01:00
2021-04-08 21:07:31 +02:00
2021-06-18 18:08:30 +02:00
2021-07-06 10:51:05 +01:00
2021-05-10 23:14:35 -07:00
2021-09-09 17:11:18 -06:00
2021-08-14 11:19:42 -04:00
2020-12-29 14:21:50 -08:00
2021-09-15 11:04:24 +00:00
2021-09-07 10:18:11 +02:00
2021-05-20 09:27:10 +01:00
2021-08-28 18:57:23 +02:00
2021-09-15 09:03:17 -07:00
2021-08-21 17:04:21 +08:00
2021-09-23 01:26:42 +02:00
2020-12-19 12:55:27 +00:00
2021-01-02 10:50:08 +09:00
2021-05-21 22:51:21 +02:00
2021-06-21 08:40:54 -06:00
2021-08-04 15:08:21 -04:00
2020-12-12 15:38:32 +00:00
2021-08-30 11:56:10 -03:00
2021-09-06 09:49:49 +01:00