From d7582e69da222e48002ef79ec1d97d55fc469dd6 Mon Sep 17 00:00:00 2001 From: Felix Dietrich Date: Tue, 2 Jun 2015 22:55:19 +0200 Subject: man: Fix description of getopts when last argument reached The description of getops in the manual incorrectly states that var will be set to "--" when no arguments remain. In fact it will be set to "?". Signed-off-by: Herbert Xu --- src/dash.1 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/dash.1') diff --git a/src/dash.1 b/src/dash.1 index 693c970..832eae7 100644 --- a/src/dash.1 +++ b/src/dash.1 @@ -1402,14 +1402,9 @@ By specifying a colon as the first character of .Va optstring all errors will be ignored. .Pp -A nonzero value is returned when the last option is reached. -If there are no remaining arguments, +After the last option .Ic getopts -will set -.Va var -to the special option, -.Dq -- , -otherwise, it will set +will return a non-zero value and set .Va var to .Dq \&? . -- cgit 1.4.1