From 081e277fe4ce510687405d1b0ef71041a282e02d Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Thu, 25 Nov 2010 19:09:31 +0800 Subject: builtin: read's --shell long option should require an argument The short option -s doesn't need it and it won't be used. Signed-off-by: Grissiom --- builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index 13694aac..a90e14c0 100644 --- a/builtin.c +++ b/builtin.c @@ -2070,7 +2070,7 @@ static int builtin_read( wchar_t **argv ) } , { - L"shell", required_argument, 0, 's' + L"shell", no_argument, 0, 's' } , { -- cgit v1.2.3 From 4ccf26fbcc3bfd27ed2f1638254bd9f4b92dbd52 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Fri, 26 Nov 2010 19:00:18 +0800 Subject: builtin: count should not accept options, not even help It is documented this way, but the common builtin_run function was checking for -h or --help before even calling the builtin_count. Without this functions like funced can't use count to check the number of arguments before checking for -h or --help. Signed-off-by: Grissiom --- builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index a90e14c0..41a95260 100644 --- a/builtin.c +++ b/builtin.c @@ -3871,7 +3871,7 @@ static int internal_help( wchar_t *cmd ) { CHECK( cmd, 0 ); return contains( cmd, L"for", L"while", L"function", - L"if", L"end", L"switch" ); + L"if", L"end", L"switch", L"count" ); } -- cgit v1.2.3